The Numbers Game – AI Version take 2

When I made my first attempt at using ChatGPT below, I had no real idea what I was doing, so did not log on to ChatGTP and eventually lost all my workings.

So I did it again, on my computer rather than the phone and treated it as a project rather than just messing about.

Still quite impressed with it’s knowledge and ability to translate my requests, and the finished product works, its just not very polished.

Here is my interaction with ChatGTP

And the working version of the code

Finally, I asked it to summarise what I asked for into a neat efficient prompt that will get the same results :-

Build an interactive HTML + JavaScript page that lets the user:

Select 6 numbers from a set: four “large” numbers (25, 50, 75, 100) and two sets of small numbers (integers 1-10).

Choose a target number between 100 and 999.

Press a “Solve” button to try to match the target using all 6 numbers and exactly 5 operators from +, -, *, /.

Use only valid Reverse Polish Notation (RPN) expressions following BODMAS, where intermediate results must be positive integers (no negatives or decimals).

Limit to the first 10 valid solutions found.

Show each solution’s steps along a single line (e.g. 6+50=56 9+56=65 65/5=13 …).

Also show total combinations tried and time taken.

Organize number selection buttons into 3 rows (large, small 1-10, small 1-10).

Generate the complete downloadable HTML + JavaScript code.