Check out Grant Acedrex, our featured variant for April, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

ChessVA computer program
. Program for playing numerous Chess variants against your PC.[All Comments] [Add Comment or Rating]
📝Greg Strong wrote on Fri, Aug 6, 2021 01:33 AM UTC in reply to Robert Mate from Thu Aug 5 01:41 PM:

Microchess is playable between humans, but crashes the ChessV engine. Not sure why.

This is interesting.  It is happening because the number of pieces is so small.  Quick fix - the problem is with the default (sudden death) time control.  Use a different time control and you should be fine.

More detailed explaination ...  At the start of each move, the computer decides how much time it would like to commit to the current move.  You could use some fixed percentage of the remaining time always, and you will use less and less for each concurrent move without running out.  But that isn't very good.  It would be better if we had some idea of how many moves the game likely to go on before being "decided" (doesn't need to be actually over if you are so far ahead you can continue to win without requiring much thought.)  This is already an interesting problem in Chess.  It's an even more difficult problem for a variant engine such as ChessV...  I make the basic assumption that games with more pieces are likely to last longer...

So, here's my current formula.  Using four variables: Number of player 1's pieces at the start of the game (P1s), number of player 2's pieces at the start of the game (P2s), number of player 1's peices still remaining (P1r), and number of player 2's pieces still remaining (P2r).  With sudden death time control, the targettime allocated for a move is:

timeRemaining / min( P1s + P2s - 10, P1r + P2r + 6 )

This crashes Microchess since it starts with 10 pieces so it tries to allocate 0% and divides by zero.  Obviously this formula was designed for larger games.  And, in general, ChessV was designed to play the common variants which are typically 8x8 or larger.  I'm sure lots of things are not optimized for tiny variants.  The obvious fix here is to always allocate at least a minimum amount (maybe 1%).  Probably, you would never want to allocate less than 1% of remaining time...  But how many moves does an average game of Microchess last?  Maybe for some games the assumption that length of game is related to number of pieces is not valid.  Perhaps the lower bound should be a configurable game variable with a default of 1%.

I just noticed a bug. If all I do is start a game, make one move, and then take back the move while the computer is thinking.. it crashes. This happens in 2.2 and the new update.

Yup.  Thank you for the easily reproducable bug report.  I will fix this.