AI Models Face Off in Classic Programming Challenge: Bouncing Ball Simulation

Artificial intelligence models recently faced a classic programming challenge that tested their ability to simulate a bouncing yellow ball within a rotating shape. The task required the AI models to write a Python script for a ball bouncing inside a rotating triangle. This exercise evaluated the models on several key aspects, including collision detection algorithms and tracking multiple coordinate systems to ensure the ball remained within the defined shape.

The prompt given to the AI models was straightforward:

"Write a Python script for a bouncing yellow ball within a shape. Make the shape slowly rotate, and make sure that the ball stays within the shape." – Aadhithya D (@Aadhithya_D2003)

Despite the clarity of the instructions, some AI models struggled to deliver accurate simulations. Notably, OpenAI's o1 pro mode, part of their ChatGPT Pro plan costing $200 per month, misunderstood the task entirely. This misstep highlighted gaps in its ability to interpret complex simulation requirements. On the other hand, DeepSeek's R1 model demonstrated superior performance, outshining OpenAI's offering in executing the task effectively.

Collision detection algorithms play a crucial role in this programming challenge. They are designed to identify when two objects collide, ensuring that the ball responds correctly to the boundaries of the rotating triangle. The complexity of this task lies in managing these algorithms across multiple coordinate systems and designing robust code from the start. As noted by an expert:

"One has to track multiple coordinate systems, how the collisions are done in each system, and design the code from the beginning to be robust" – n8programs

In addition to OpenAI's model, other AI systems also faced difficulties. Users on X reported that Google's Gemini 1.5 Pro model misjudged the physics, resulting in the ball escaping from the intended shape. Similarly, Anthropic's Claude 3.5 Sonnet model failed to accurately simulate the physics involved, leading to incorrect results.

The programming challenge proved demanding even for human programmers. A researcher took approximately two hours to program a bouncing ball in a rotating heptagon from scratch, underscoring the complexity of such tasks.

Tags

Leave a Reply

Your email address will not be published. Required fields are marked *