Wednesday, October 04, 2023

CardChess V006

 ChatGPT Summary

Over the past week, our discussions have mainly revolved around the implementation and debugging of a game simulation involving cards, players, and boards. Here's a quick summary

Game Implementation & Cloning
We explored designing classes like Card, Player, and Board and implemented cloning mechanisms to create deep copies of these objects, ensuring the original game state remains unchanged during simulations.

Minimax Algorithm & Simulating Moves
We implemented a version of the Minimax algorithm for determining the best move for a computer player in the game.
We introduced SimGameState to simulate game states for exploring possible future moves without affecting the actual game state.
Developed methods like ApplyMove and ApplySimMove to allow a move to be made in the simulated game state.
Introduced SimMove to handle moves within SimGameState, and methods to convert back and forth between Move and SimMove.

Scoring and Move Evaluation
Explored the logic of scoring and evaluating moves and developed methods like RankMoveForBoard and GetPlayerScore to estimate the value of a move or a board state within the Minimax algorithm.
Iterated on RankMoveForBoard and GetPlayerScore to consider various game scenarios and card states (like covered cards or cards covering an opponent's card).

Debugging and Refining Logic
Throughout our discussions, we worked through various logic and implementation challenges, ensuring that cloned and original objects are managed properly, and that moves in simulated game states are accurately represented and do not affect the actual game state.
Addressed specific issues like making sure that moves are valid, players' states are updated appropriately, and that the Minimax algorithm explores possible moves in a logical and efficient manner.

Future Steps
Potential next steps might involve further refining move evaluation logic, optimizing the Minimax algorithm, addressing any remaining bugs or logical inconsistencies, and potentially exploring additional features or variations of the game.

Wednesday, August 30, 2023

CardChess v0.05

Soo... I've been quietly developing CardChess as an experiment in using ChatGPT and AI-powered coding techniques. So far there has definitely been an improvement over doing it myself (mainly due to my lack of knowledge with MonoGame and the finer details of C#). It's also much more fun and collaborative using it more as a pair programmer experience. 

I've recently also cleaned up the opening menu with the Leonardo.ai generated art to the left (Stable diffusion skinned system)

Below is ChatGPT's summary of the project so far..


 ChatGPT Summary: 

As of your last update, the CardChess project is in the process of implementing computer-controlled players. The game can be played between two human players, and the basic structure and rules of the game have been implemented. Here are some of the key aspects that have been worked on:
  • Game Concept: The game concept, including the rules, the board setup, the movement of the cards, and the win conditions, has been defined.
  • Board Setup: The board is set up with a 6x6 grid, and the initial positions of the cards for both players have been implemented.
  • Card Movement: The movement of the cards, including the rules for valid moves and attacking, have been implemented. The Move class has been created to handle the movement of the cards, and the PlayableCard class has StartMove and FinishMove methods to handle the start and finish of a move.
  • Win Conditions: The win condition, which is covering both kings of the opponent, has been implemented.
  • Game States: Different game states, such as the opening menu, human turn, computer turn, and game over, have been implemented.
  • UI: The opening menu has been implemented, including the play button and the background. The game state is also being exported to a JSON file for future analysis and AI learning.
  • Computer Player: The framework for a computer opponent has been started, including the GetMove method to get a move from the computer player, and the ExecuteMove method to execute the move. The Player class has a GetMove method that can be overridden by the ComputerPlayer class. Currently the computer opponent only uses random moves.
  • Animation: Implemented the animation for the movement of the cards.

Pending tasks include:
  • Computer AI: Developing multiple AI opponents.
  • Testing and Debugging: Thorough testing and debugging of the game to ensure that it runs smoothly and without errors.
  • UI Enhancement: Enhancing the user interface, including the opening menu with opponent selection, clean up the game board, and the game over screen.
  • Game Analysis and AI Learning: Implementing the game analysis and AI learning features using the exported game state.

Monday, January 16, 2023

GameLog 2023-02

 Toward the end of last year the Steam stats in review reminded me of the old GameLogs and had a few hours of reminiscing. That also led to a new Year's resolution to kick them off again this year with a potential cover of iPad / Android games too. 


Software Inc - 16.5 Hrs - Pretty sure I've played it before, but a few new updates had me pick this one up to round out a return to Steam games over the holidays. A couple of attempts to get a fledgling company off the ground into launching its first game, but when it netted ~500K it felt like the game was essentially solved. Might come back at a later point and set a few moe challenges, like manufacturing my own console. 


HexRogue - 5.3 Hrs - Quick little strategy game combining catan-like maps into a tactical battler. Seems a little too quick, but still in beta.


Star Valor - 48 Hrs - Possibly not all in this year, but a neat little space privateer game with a bit more focus on building a posse' rather than going it alone. Only got into what feels like the mid-game in terms of ship size, but felt like I could see the finish line. Might try again when it's released.


Stellar Winds - 12h - Android idle space battler that uses ship styles to relatively good effect to make it not just a linear experience. 


Pokemon Purple - 3h - Switch pickup for the family for Christmas, largely driven by MissGooey's Pokemon craze that is still going strong. Giving it a whirl too.


Urban flow -1.5h - quick little switch co-op game with Sandy. Good frantic traffic light flippin'