66 Revisited
Sun 02 April 2023
A few months back I described my computerized 66 card game; I have made quite a bit of progress on it and want to present an update.
Here's a summary of components and features:
- The game engine module captures the mechanics of play.
- A host module sequences single-game play between two client players.
- A player-agent module allows two human players to play against each other through a host.
- A networked messaging module implements basic message transport between host and client entities.
The messaging module is a simple but important component that enables independent player-agent processes via networked connections. With this, human players can connect remotely to play, so Kristin and I could play from our respective computers across the house, or from anywhere in the world (this actually needs more work - but not much). More importantly, the messaging module enables creation of computer player-agents that can play an opposing player - human or computer - while running a machine learning algorithm in the background to learn how to be a better player.
Currently, I am using Redis as the networking interface, where a simple message exchange protocol supports cleartext messages and queries, and simple JSON serialization/deserialization of Lua objects so that game state may be exchanged between host and clients.
Here's what game play looks like. Note that I show Kristin and me as players - this is a slight fiction right now because I have names hard-coded, and I'm really just playing against myself as "p1" and "p2" to test the code. Also, I have not yet tested networked play from one computer to another. But that will come soon.
Phil's View | Kristin's View |
---|---|
![]() |
![]() |
Finally, I thought I'd briefly describe my development environment, running on Linux Mint XFCE. The screenshot below shows how I set up for this project. This is a dedicated desktop, showing five consoles and a corner of Leo Editor, which I use for code development. Each of the consoles is named, and performs a specific function:
Name | Description |
---|---|
redis: | This is the redis-cli console, where I can interact with the network messaging |
nHost: | This console runs the host code. It displays all client interaction, so you see both players here |
player1: | This runs a client player instance, and is what player 1 - Phil - sees during play |
player2: | This runs a client player instance, and is what player 2 - Kristin - sees during play |
commands: | I have several Bash scripts to automate setup, starting and stopping of all the console code. This is where I issue those commands. |