How can I run the terminal game locally using the library engine?

Hello,

I am setting out to build a machine learning approach to the game. In this aim, I was thinking about using the engine library and the class GameMain to emulate the game and train my AI.

I could not find any documentation on the library. Is there any reference material to help me understand how the class GameMain works?

Also, my test program stops on the instruction GameMain.startGame. Any idea why? For context, I am using an implementation of the Player interface.

Bot :
public class Bot implements Player{

@Override
public boolean checkCrashed() {
	// TODO Auto-generated method stub
	return false;
}

@Override
public void close() {
	System.out.println("close");
}

@Override
public void finishInitialization() {
	System.out.println("FinishInitlization");
}

@Override
public void gameEnd() {
	System.out.println("GameEnd");
}

@Override
public CompletableFuture<PlayerMove> makeMove(Duration arg0) {
	CompletableFuture<PlayerMove> move = new CompletableFuture<PlayerMove>();
	System.out.println("makeMove");
	return move;
}

@Override
public String name() {
	// TODO Auto-generated method stub
	return "bot";
}

@Override
public void send(String arg0) {
	System.out.println("send"+"    "+arg0);
}

@Override
public PlayerType type() {
	return PlayerType.ALGO;
}

}
Thank you !

Unfortunately, the game engine is currently closed-source, and not meant to be used as a library. We have considered the potential to open-source parts of the game engine, but those thoughts are still very preliminary at this point.

If you’re dedicated to applying machine learning in the game, two approaches we would recommend are:

  • Running the engine, as provided, with the CLI.
  • Making your own version of the engine, in whichever language you prefer.

Implementing the game engine does not worth it I suppose …

Well, that’s essentially what so many of us are doing with our action phase simulators. It’s not that hard to get one working, and that’s the hardest part.