Mostly messing with "forfax" AI
It would be nice to have an AI that doesn't segfault. Currently segfault caused by Board::ForgetPiece. valgrind outputs a lot of wierd crap about std::vector and uninitialised values Uninitialised values created by std::vector::push_back() All I am pushing is a simple pointer (Piece*), so I don't know WHY uninitialised values happen... The std::list used in MakeMove is somehow using the same memory as the std::vectors of the board, which is causing invalid reads Stupid, stupid stdlib. I think that once that is fixed, forfax is pretty much done. I'd like to see how well it plays, but... segfaults. I also fixed dummy to take into account the modified turn protocol which prints piece ranks. dummy just reads them and ignores them. I plan to make the manager program more useful - Enable human players - Add command line arguments for things like timeouts, graphics on/off etc - Read a game from a file (so that games can be viewed after they are run) I need to go through the manager program carefully and make sure that the way AI programs quit actually works Ideally the AI program has a short period to exit gracefully before it is killed I think for some reason the AI program always just gets killed. At some point I need to setup a VM for this. I should probably do that. I also might change minor things like the tokens (from random characters to digits + a few characters) and the internal ordering of the enum Piece::Type
Showing
- manager/controller.cpp 4 additions, 4 deletionsmanager/controller.cpp
- manager/dummy 0 additions, 1 deletionmanager/dummy
- manager/forfax 0 additions, 1 deletionmanager/forfax
- manager/main.cpp 19 additions, 5 deletionsmanager/main.cpp
- manager/stratego.cpp 1 addition, 1 deletionmanager/stratego.cpp
- samples/dummy/Makefile 2 additions, 0 deletionssamples/dummy/Makefile
- samples/dummy/dummy.cpp 14 additions, 12 deletionssamples/dummy/dummy.cpp
- samples/forfax/forfax.cpp 397 additions, 223 deletionssamples/forfax/forfax.cpp
- samples/forfax/forfax.h 52 additions, 28 deletionssamples/forfax/forfax.h
- samples/forfax/main.cpp 68 additions, 10 deletionssamples/forfax/main.cpp
Please register or sign in to comment