Dice Game (Liar's Dice)

yacoubb/web-terminal
A functional web emulator written in react.
JavaScript
0
0
When visiting my family in sweden one year they introduced me to a game commonly known as Liar's Dice. It seemed like prime real estate for reinforcement learning, so I set out to create a model that would learn to play the game entirely through self-play (inspired in no small part by OpenAI's Multi-Agent Hide and Seek project). To start with this project, however, I had to digitise the game. I first attempted to create a GUI in react, but that seemed needlessly over-engineered and I ended up settling on a terminal-based version instead.
As it turns out, dice-game (as my flatmates lovingly named it) was quite fun to play over a discord call. I wanted to open the option for anyone in the world to play the game, but ran into issues with how the game was structured. At the time, to play the game, you needed the latest client.js file plus NodeJS to connect to the server, which caused a lot of headache with distribution, especially when prototyping. This lead to me starting the web-based terminal project shortly after, to which I ported this project. I also implemented a room-based backend so that multiple games could be played simultaneously. The game can be played live using the web-terminal emulator and the command diceGame.
Around a similar time when I was working on this project, I also decided to have another crack at blob-game, since the single-server-multiple-room paradigm was similar. Noting this similarity, I ended up abstracting the room system into a separate npm package and project, which dice-game now makes use of.