top of page

Card Player: Command Line Solitaire


This is Phase 3 of the Card Player series I have been blogging about. I am attempting to make a Solitaire playing bot.

Phase 3: Simulating Solitaire


The approach I took to simulating Klondike (Solitaire) is at each step, find all of the valid moves and present those to the user. Rather than validate the user's action after the fact. I wanted to do it this way to make it easier to train a machine in how to determine the best strategy. This way I don't have to worry about also training the machine what the valid moves are because in this world the only moves possible are valid ones.

This intermediate step of creating a command line based version of solitaire is necessary to have a machine rapidly learn how to play.


Run SolitaireSimulator.py to play the command line version!


Once the machine knows how to play effectively in the simulation world, then the next step is to present it with inputs from the screen based version of solitaire. At that point I will have to worry about moving the mouse and dragging and dropping the right cards in to the right places. That will be its own challenge.

コメント


bottom of page