I asked ChatGPT to solve this problem, which it did perfectly.

Then I asked ChatGPT to create code in LiveCode to solve the same problem.  It 
generated some surprisingly great "looking" LC script which on the surface 
seemed like it would work.  I allowed ChatGPT 4 tries to generate functional 
and complete code to solve this problem.  It was never able to.  Try it.  It's 
interesting to see the variations that it comes up with.


PROBLEM in plain English:

If there is a finite number of colored slots on a board; let’s say 15, the 
first 4 are filled. Also slot 7 and 9 are filled. I have 6 new colors that I 
need to store in open slots.  Which available slots can I put these 6 colors 
without leaving any gaps?  Each color must be unique.



ChatGPT response:

To place 6 new colors in the available slots without leaving any gaps, you'll 
need to use slots that are consecutive and unoccupied. In your scenario, you 
have a board with 15 slots, and the first 4 are filled, slot 7 is filled, and 
slot 9 is filled. So, you have the following situation:

  1.  Filled
  2.  Filled
  3.  Filled
  4.  Filled
  5.  Available
  6.  Available
  7.  Filled
  8.  Available
  9.  Filled
  10. Available
  11. Available
  12. Available
  13. Available
  14. Available
  15. Available

To place 6 unique colors without any gaps, you can use slots 5, 6, 8, 10, 11, 
and 12. This will fill all the available slots without any gaps:

  1.  Filled
  2.  Filled
  3.  Filled
  4.  Filled
  5.  New Color
  6.  New Color
  7.  Filled
  8.  New Color
  9.  Filled
  10. New Color
  11. New Color
  12. New Color
  13. Available
  14. Available
  15. Available

Now you've placed 6 unique colors in the available slots without any gaps.

/END ChatGPT response




_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to