Initial commit

This commit is contained in:
Nemo 2018-01-28 03:34:20 +05:30
commit 9d17bf6b04
2 changed files with 54 additions and 0 deletions

11
README.md Normal file
View File

@ -0,0 +1,11 @@
# boardgame2vec
An attempt at board game state space serialization. The basic assumption is that the board game is just a complicated state machine, with player playing moves that result in state transitions.
If you can serialize a board game, you can do cool stuff:
1. Play it over the wire
2. Record games played over time
3. Learn patterns from previous games
This tries not to introduce players into the state itself, instead use markers to keep track of where everything is. Built using Cap'n Proto. The game rules themselves are not part of this.

43
sushigo.capnp Normal file
View File

@ -0,0 +1,43 @@
@0x8c474a82150f9ee5;
enum CardType {
chopstick @0;
dumpling @1;
maki @2;
nigiri @3;
pudding @4;
sashimi @5;
tempura @6;
wasabi @7;
}
enum Desserts {
pudding @0;
}
enum PlayerCardLocations {
hand @0;
meal @1;
carry @2;
}
struct Location {
union {
deck :group {
deck @0 :Bool;
}
player :group {
# Which player
index @1 :UInt8;
location @2 :PlayerCardLocations;
}
}
}
struct Card {
type @0 :CardType;
location @1 :Location;
}