Wildcard Grid Game
Scores — Player: 0 | AI: 0
AI Move Log
Game Rules
- 6x6 grid
- 4 wildcard (?) symbols randomly placed — never adjacent or on outer edge
- Players take turns (Player = O, AI = X)
- Wildcards count as either O or X for scoring
- Scoring:
- 3 in a row = 1 point
- 4 in a row = 2 points
- 5 in a row = 3 points
- 6 in a row = Instant win
- Game ends when no empty cells or no further scoring possible
Development Notes
Well, this was a weird one in terms of development, as I seemed to be constantly battling Chat GPT missing out new bits, or putting in the new bits but omitting what was already there. I'm still not quite sure whether it was because I didn't provide enough clarity in my prompts at times (I didn't think that was the case, but certainly something was going wrong!). I repeatedly hit the free data analysis limits and had to wait till the next day. What I present here is fully playable and incorporates all my game design ideas, although the AI opponent is pretty lacking in any meaningful challenge still.
For this game I took the classic Noughts and Crosses (Tic-Tac-Toe) idea and quadrupled the playing area - to a 6 x 6 grid - and allowed for runs of 3, 4, 5 and 6 in a row - the last one being an outright game winner, although technically it should be pretty much impossible for it to happen unless one player is really not paying attention! Then I added a scoring system for the runs, obviously longer runs bringing higher scores, and also added 4 randomly-placed wildcard symbols ("?") which could work as either O or X, depending on what was next to it. That was probably the trickiest aspect for the AI to understand and build working code for.
With the slightly hit-and-miss results from asking the GPT to update the code, there are a couple of things missing from this build. (It was like a game in itself, where version control had random elements!) I did have it highlighting the scoring phases briefly but this got lost from the "final" code. I may possibly go back to it and re-implement this, and improve the AI, but for now it's a playable enough game so I'm going to leave it alone for now. May be for my next project, I'll try creating a game that doesn't involve an opponent - I wonder if this will be easier.
We shall see!!!
See also my first game experiment - just standard Noughts and Crosses.
More about my experiment to make simple JavaScript games with AI Tools.
No comments:
Post a Comment