Learning Timeline
Key Insights
Image File Pathing Issues
Some AI models like DeepSeek might struggle to automatically detect image file (icon) locations. Ensure the image filenames in the code exactly match the filenames in your folder.
AI Logic Limitations
While the AI might successfully change piece movement logic, it could overlook other complex rules like the 'Checkmate' system unless you specifically ask for it.
Prompts
Base Chess Game Code Generation
Target:
Gemini / ChatGPT
Create a chess game I can run on my computer using Python. Include a GUI for the board and pieces.
Modifying Movement Logic
Target:
Gemini / ChatGPT
Modify the logic of this chess game so the King moves exactly like the Queen.
Step by Step
Building and Modifying a Chess Game with AI
- Open your preferred AI platform, such as Gemini or ChatGPT, in your web browser.
- Enter a prompt asking the AI to generate Python code for a complete chess game.
- Set up a project folder on your computer and place the image files (icons) for each chess piece into that folder.
- Copy the Python code generated by the AI and save it as a file named `chess_game.py` in your project folder.
- Run the file using a terminal or an IDE like VS Code to ensure the game works with the correct visuals.
- Go back to the AI chat and enter a follow-up prompt to modify the game rules (custom logic), such as changing the King's movement.
- Copy the updated code from the AI and replace the old code in your `.py` file.
- Run the application again and test the piece movements to confirm the AI has followed the new logic instructions.