In 2023, we presented an article that explored how the simplicity of Minesweeper could be combined with the capabilities of artificial intelligence available at that time. We chose this game due to its classic design and simple logical structure, perfect for demonstrating the potential of AI technology. It was a way to see the potential that AI technology had at that time.
Today, we have much greater power when it comes to generating code, such as the ability to develop complete applications in minutes, implement modern user interfaces or create custom solutions with unprecedented speed, among many other things.
The proof of this is the version I have created today of this famous game, trying to see how it improved in terms of quality and programming speed above all.
Method
Nowadays, many of you already know what a "prompt" is, an instruction or set of instructions that we give to an artificial intelligence model to generate results. Therefore, I will not delve into the necessary iterations or details, but the mechanism I usually follow to obtain software is:
- Prompt 1: "I want you to give me the Minesweeper program in HTML in a single file"
- Result 1: a preliminary version that already has the main functionalities.
- Prompt 2: "Now improve it by adding complexity, functionality, and modern aesthetics"
- Result 2: a much more sophisticated version of the game, with expanded features such as visual indicators and interactive effects, in addition to a modern and attractive aesthetic.
- Prompt 3: "Very well, now add functionalities that you find interesting and further improve the aesthetics, do it with several gameplay options and with results at the end of achievement and time"
- Result 3: The perfect game.*
* Perfect means that it fully meets the initial specifications, such as basic functionality and smooth gameplay, and exceeds them by incorporating modern aesthetics, additional gameplay options, and a results system that measures time and performance.
Model Used
In this case, I used the ChatGPT 4o (Plus) model with the Canvas option, which allows working in an interactive visual environment ideal for managing larger or structured content, facilitating large reviews and edits. It should be noted that after the tests I have been doing, the model o1 is vastly superior with its reasoning ability and drastically reduces iterations.
This example is simple, and with the 4o model it has been more than sufficient, but the power of advanced models is brutal. Soon I will show an example of a much more complete application.
In this case, I used the ChatGPT 4o (Plus) model with the Canvas option.
Results
Here is the game on codeopen.io, which by the way I love for prototyping and testing quickly.
💎 Play Minesweeper 💎
The link to view the code.
Conclusion
We live in a transformative era, marked by unprecedented technological advances in artificial intelligence, which are revolutionizing areas such as software development, process automation, and the generation of innovative solutions. Every day there are improvements and a near future presents many changes.
Programming is going to undergo a radical paradigm shift, where programs will be as good as their designers, and the time spent on technique will change to time spent on design, ideas, and concepts.