Skip to content

op12no2/roller

Repository files navigation

Roller

Roller is a fun and very weak little Javascript UCI chess engine that only knows the rules (except 3-fold repetition).  It has absolutely no semantic knowledge at all, not even the relative piece values.  It plays by performing thousands of totally random games (rollouts) from the current position.  Wins, losses and draws are scored 1, -1, 0 and it simply chooses the root move with the highest average score.  Obviously at the start of a game this is esentially just random play, but it can avoid mate and give mate when they are clearly in sight.

You can play Roller here:-

https://op12no2.github.io/roller/

The "kr/s" figure is showing thousands of rollouts (complete random games) per second.

Interestingly when pitted against a true random mover version of itself, Roller wins all of the games, other than sometimes accidentally falling into 3-fold repetition because it does not know that rule.

Roller can be used in Arena etc like Lozza.

Roller does not terminate at known draws like KK for example, because that is definitely feeding in knowledge; however tempting it is to do so in the name of kr/s.

You can change the number of seconds Roller takes to move from the entry field above the board, which by default is 10s.

While thinking Roller displays a status above the board of the form:-

time so far (seconds) |
thousands of rollouts (games) so far |
thousands of rollouts per second so far |
best move so far

After moving Roller displays information for each root move:-

move, average length of rollout (plys), total score and number of games, average score.

**** depicts the best score.

Play roller online

https://op12no2.github.io/roller

Acknowledgements

https://github.com/oakmac/chessboardjs

https://github.com/jhlywa/chess.js

https://github.com/jquery/jquery

https://github.com/topics/bootstrap

Releases

No releases published

Packages

No packages published

Languages