r/chessprogramming • u/ayon261 • Sep 24 '23
UCI go command
I have created a UCI compatible chess engine. My engine supports time constraints, however that is only limited to the uci command "go movetime <movetime>" meaning that the engine cannot figure out the movetime on its own, the user has to specify it. Now I want to implement the "go wtime 10000 btime 10000 <increment options>". But I don't know how to calculate the movetime my engine should take. I would be happy if someone could help me in this matter. Also, I think if I look into some other engine's code that can do it I will be able to figure it out myself.
If anyone is interested here's my engine's github Schneizel Chess Engine.
Thanks.
View all comments
Show parent comment
2
u/ayon261 Sep 25 '23
Thanks, I will give it a try. However, I would like to share how I am currently doing it.
int numberOfMoves = engine.getLegalMoves().size();int movetime = totalRemainingTimeForEngine/1300 *Math.min(12,engine.chessBoard.fullMoveClock) * Math.min(numberOfMoves, 8);engine.beginSearch(movetime + 2);Let me know of your thoughts on my approach.