I started with 0 Lua (programming language) knowledge so it took me while to get things rolling.
Lua is definitely good language and not even slow. luataxx is generating moves 400knps on my slow CPU. Pretty good and only getting faster as I improve the code.
Source code: https://github.com/SamuraiDangyo/luataxx
Initial release: https://github.com/SamuraiDangyo/luatax ... /tag/v1.01
Some information of luataxx.
- First Lua Ataxx engine?!
- luataxx generates real moves not boards like Sapeli. Ataxx is 100x easier game for mgen than Chess960.
- luataxx supports uai - protocol
- luataxx supports boards 5x5 -> 20x20
- luataxx can be used without GUI. luataxx has very pretty and clear command line board.
- luataxx can solve simple tactics 100% and beats "Random Mover" almost 100% score.
- to enter uai mode luataxx needs -uai handle at start
Thanks to Ronald Chastain's(Luciolette) Lua uci implementation and python-ataxx for Unicodes. Saved some time for me!
Human vs luataxx on 5x5 board:
Code: Select all
./luataxx.lua -think 3000 -width 5 -height 5 -play 2
a b c d e
╔═╦═╦═╦═╦═╗
5 ║X║ ║ ║ ║X║ 5 ( white: 7 )
╠═╬═╬═╬═╬═╣
4 ║X║X║ ║ ║ ║ 4 ( black: 0 )
╠═╬═╬═╬═╬═╣
3 ║#║ ║ ║ ║ ║ 3 ( turn: O )
╠═╬═╬═╬═╬═╣
2 ║ ║ ║ ║ ║ ║ 2 ( rule50: 0 )
╠═╬═╬═╬═╬═╣
1 ║X║X║X║ ║ ║ 1
╚═╩═╩═╩═╩═╝
a b c d e
[Site "luataxx.lua"]
[White "AI"]
[Black "Human"]
[BoardWidth "5"]
[BoardHeight "5"]
[Fen "o3x/5/-4/5/x3o x"]
[Date "2019.11.04"]
[TimeControl "3s/move"]
[Result "1-0"]
a1b2 e1c1 a1b1 a5a4 b2b4 {luataxx adjudication: black has no pieces left ( White wins by 7 points )} 1-0[/pgn]
luataxx vs luataxx on 9x9 board
Code: Select all
./luataxx.lua -think 10000 -width 9 -height 9 -play 3
a b c d e f g h i
╔═╦═╦═╦═╦═╦═╦═╦═╦═╗
9 ║O║X║X║X║O║O║X║X║X║ 9 ( white: 66 )
╠═╬═╬═╬═╬═╬═╬═╬═╬═╣
8 ║O║O║X║X║O║O║X║X║X║ 8 ( black: 14 )
╠═╬═╬═╬═╬═╬═╬═╬═╬═╣
7 ║O║O║X║X║X║X║X║X║X║ 7 ( turn: O )
╠═╬═╬═╬═╬═╬═╬═╬═╬═╣
6 ║O║O║O║X║X║X║X║X║O║ 6 ( rule50: 3 )
╠═╬═╬═╬═╬═╬═╬═╬═╬═╣
5 ║X║X║X║X║X║X║X║X║O║ 5
╠═╬═╬═╬═╬═╬═╬═╬═╬═╣
4 ║X║X║X║X║X║X║X║X║X║ 4
╠═╬═╬═╬═╬═╬═╬═╬═╬═╣
3 ║X║#║X║X║X║X║X║X║X║ 3
╠═╬═╬═╬═╬═╬═╬═╬═╬═╣
2 ║X║X║X║X║X║X║X║X║X║ 2
╠═╬═╬═╬═╬═╬═╬═╬═╬═╣
1 ║X║X║X║X║X║X║X║X║X║ 1
╚═╩═╩═╩═╩═╩═╩═╩═╩═╝
a b c d e f g h i
[Site "luataxx.lua"]
[White "AI"]
[Black "AI"]
[BoardWidth "9"]
[BoardHeight "9"]
[Fen "o7x/9/9/9/9/9/1-7/9/x7o x"]
[Date "2019.11.04"]
[TimeControl "10s/move"]
[Result "1-0"]
i9i8 a9b8 i8g8 i1g3 i9h8 g3e3 g8g9 a9a8 a1b2 a8c6 h8f6 b8b6 g8f9 b6d8 g8f7 e3f5 f7e7 c6e6 i9i8 e7g7 d8f8 f6h8 f9h9 g7h7 f8g6 e6d7 a1b1 d7f8 b1d2 a9b8 h7f9 f7h7 d2f4 h7i6 b2a4 i6i7 f4g3 i7h5 f5e5 h5h6 f4g4 b8c8 a1c3 h8f6 h5i4 g6f7 g9h8 f8e9 h5i7 e5d5 c3a3 f6h5 f4f6 f9d9 g8f9 b8c9 g3h3 i6i5 g3g2 c8a8 a4b4 h5h4 e9d8 h4f4 g2g1 h5h4 g2f3 a8b7 g1i1 d5e3 g4g5 b8a7 g3h2 b7c6 i1i3 e5d7 a3c4 c6c7 h2i1 d7e8 h2g1 f7e7 h3i2 c7c8 a4a6 a8b6 g3e2 a6c5 i3h1 e6d6 g1i3 b4d5 i2g1 c7b9 e3g3 b8c7 e2c1 c8a8 g2f2 c7a6 h2i2 d9c8 c1c3 c6b5 c3a2 c4b4 a2c1 a7c7 g2e3 b6d4 h3g2 b4a4 g2f1 c4b6 c1c2 d4d2 f4e4 c6a5 e4e5 b6c6 g2e1 b6d4 g3g2 b4a2 e1e2 c1d1 e3d3 c8b6 e6c8 a6a7 d7e6 a4c3 d5c4 a2a4 c3b4 c1a1 b4a3 a1c1 c3b2 d1b1 e2d1 b1a1 a3a2 0000 0000 {luataxx adjudication: 2 passes in row ( White wins by 52 points )} 1-0[/pgn]