Skip to content
Roller javascript chess engine
JavaScript HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bootstrap3
css
img/chesspieces/wikipedia
jquery-ui-1.8.24/js
js
LICENSE
README.md
index.htm
lozuilib.js
play.js
roller.js

README.md

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.  There is no search strategy at all.  In effect it's a "pure" MCTS algorithm.  Wins, losses and draws are scored 1, -1, 0 and it simply chooses the move with the highest net score.  Obviously at the start of a game this is mostly 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 complete rollouts (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.

If rollouts last longer than 450 ply, a draw is assumed, as some crazy games can last longer than 1000 ply.  This does kinda of compromise the no-knowledge (or "zero") element, but I can live with it.

It 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 the net score and number of rollouts for each  legal move, for example:-

...
e6 9 / 1150
d5 31 / 1192 ****
d6 -8 / 1197
...

**** depicts the best score and the move chosen.

 

You can’t perform that action at this time.