me and my friend would like to create ML AI for vcmi.
Obviously our language of choice is python (At least for now, for teaching ai and experimenting, later we would port taught agent to c). Using C++ (on scale of whole project, for parts we could use it) is not an option for us. However that creates problems with interaction with game. In this post we would like to consult with you ways of making this interaction possible.
We’ve thought about few ways of connecting game with out python ai:
- Option one - own client. As we’ve studied codebase of project we’ve found that it would be possible to just start server and then interact with it as vcmi client would. However our attempt in deserialising data in python failed miserably.
Here’s what we’ve tried and questions we have:
- We’ve tried to deserialise binary data in packets - it failed because we would need to map them on c++ specific data structures, is that right?
- Then we’ve tried to rewrite server and client to use JsonSerializers. We failed because we are really bad at c++
- Option two - write simple ai the same way as current ais are written - but instead of implementing functions in c++ we would connect to our agent by socket and transfer to it current state of the game and receive instructions from it.
Problems and questions:
- Is it possible to automate starting game and run it without gui at high speeds?
We have some background in ML which could make it possible for such AI to exist but we need directions and/or help to connect it to game. Please, if you could guide us or help implementing (or show us ready implementation) such connector, your help would be indispensable.