Chess player: Difference between revisions

Line 1,077:
</pre>
Opening play could be improved a lot by using book moves, which is easy to do in python-chess with its Polyglot support.
 
Here is an example of a won game against a random mover chess bot, just to show this Python engine can actually win, provided its opponent is inept enough. (Human chess beginners tend to play on a random mover level, so this is a useful benchmark.)
<pre>
[Event "Rosetta Code Chess Classics"]
[Site "Rosetta Code"]
[Date "2022.05.08"]
[Round "1"]
[White "Random Mover"]
[Black "Python Simple Chess"]
[Result "0-1"]
 
1.Nf3 e6 2.c4 Qf6 3.Ng1 Qf4 4.h4 Qxc4 5.e3 Qe4 6.Qg4 Qxg4
7.Nh3 Qxh4 8.d3 Bb4+ 9.Bd2 Bd6 10.a4 Nc6 11.Bc3 Qg4 12.Ba5 Nxa5
13.Be2 Qxg2 14.Ng1 Qxh1 15.b4 Qxg1+ 16.Bf1 Bxb4+ 17.Nc3 Bxc3+
18.Ke2 Bxa1 19.Kd2 Qxf1 20.Kc2 Qxf2+ 21.Kb1 Qb2# 0-1
</pre>
 
=={{header|Wren}}==
Anonymous user