Git Product home page Git Product logo

wukongjs's Introduction

wukongjs's People

Contributors

maksimkorzh avatar pauljefi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wukongjs's Issues

Send uciok

Send uciok message at the end, after receiving uci command and sending the engine info etc.

Very high memory usage

I've noticed that WukongJS uses a rather large, and unexpected, amount of memory. For example, even just running 3 engines concurrently (using Cute Chess CLI) uses 3-5 gigs of RAM on my computer.

I'd like to be able to run more tests and use Wukong to do some benchmarking, but I'm not really able to run more than 1 or 2 instances at once before it stops responding to pings (because there's no memory left for it to use).

Just a nice comment!

Hello, maksim. Looks very good! I have been looking for a good but relatively small and simple JS chess engine that communicates via UCI. I will follow your progress (almost done?) and then use it to "tinker around" when you are done. Have you also made a YouTube series of this? (Your YouTube tutorials are great!). Thanks again!

  • Ken

Undo don't change Draw by 3 fold repetition flag

Problem:

When user clicked undo button, game responded like it has already gone to a draw.

How to reproduce

  • Make draw by 3 fold repetition
  • Click Undo button several times
  • Try to make a move, and game responded with Draw by 3 fold repetition

PGN:

1. e2e4 g7g6 2. h2h4 {4} b8c6 {(b8c6 b1c3 g8f6 g1e2 d7d5 e4d5 f6d5 d2d4 d5c3 b2c3) -0.24/8 1} 3. h4h5 {3} g6h5 {(g6h5 d1h5 g8f6 h5e2 c6d4 e2d3 e7e5 b1c3 d7d6) -0.76/9 1} 4. d1h5 {1} g8f6 {(g8f6 h5e2 d7d5 b1c3 d5d4 c3b5 a7a6 e4e5 c6e5 e2e5 a6b5 f1b5) -0.69/8 0} 5. h5g5 {4} f6e4 {(f6e4 g5h4 d7d5 d2d3 e4d6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3f2 a3b4 f2g3 e7e5 g3h3 h7h5 g4h5 h8h5) -20.69/9 1} 21. f2e3 {2} b2a3 {(b2a3 e3f2 e8g8 f3h4 a3c5 f2f1 e7e6 h4f3 h7h5 g4h5 c5h5) -20.7/8 1} 22. e2d3 {2} a8d8 {(a8d8 f3e1 a3b4 e1f3 g7h6 g4g5 b4c5 e3e4 h6g5 f3g5 c5g5) -21.09/7 1} 23. f3d4 {4} d8d4 {(d8d4 e3f2 a3d3 g4g5 d4g4 f2e1 d3e3 e1f1 g4g5) -27.95/8 1} 24. e3e2 {5} a3d3 {(a3d3 e2e1 d4g4 e1f2 g7d4 f2e1 g4g1) NaN/6 0} 25. e2f2 {(e2f2 d4g4 f2e1 g4g1 e1f2 g7d4) NaN/5 0} c7c6 {0} 26. g4g5 {(g4g5 d4g4 f2e1 g7d4 g5g6 g4g1) NaN/7 0} f7f6 {3} 27. g5f6 {(g5f6 d4f4 f2g2 f4f6 g2g1 d3c2 g1h1 f6f1) NaN/8 0} e7f6 {1} 28. f2g2 {(f2g2 d3e2 g2h3 e2e3 h3g2 d4d2 g2f1 e3f2) NaN/8 0} d3e3 {2} 29. g2h1 {(g2h1 d4d1 h1g2 d1d2 g2h1 e3e1) NaN/5 0} e3f3 {3} 30. h1h2 {(h1h2 c6c5 h2g1 d4g4 g1h2 f3g2) NaN/5 0} f3f2 {2} 31. h2h1 {(h2h1 d4d1) NaN/2 0} f2f1 {1} 32. h1h2 {(f4e3 f6e5 e3f3 f5f4 f3e2 f4f3 e2f2 e5e6 f2e3 f3f2 e3e2 f2f1q e2d2 f8f3 d2c2 f1f2 c2b1 c6c5) +18/15 1} d4e4 {(f6f5 h2g3 g7e5) NaN/4 0}  1/2-1/2 Draw by 3 fold repetition

Avoid time forfeit

Revise the code,
From:

if ((nodes & 2047) == 0) checkTime();

To:

if ((nodes & 2047) == 0) {
  checkTime();
  if (timing.stopped) return 0
}

UCI move list/board state

You said you're using chessjs for the frontend but how does python-chess keep track of the board state? Are you just passing that to the backend?

Add pieces to the pure algebraic pv

I want to start working on code that adds the functionality of converting the pure algebraic pv output to descriptive notation. This would, for example, change g1f3 to Ng1f3 and finally to Nf3.

We need to do the following. Any help with items 1 and 2 is appreciated.

  1. Identify where in the Wukong code we can declare a variable for each moved piece.
  2. Identify where in the code we can introduce this variable to each node output in the pv.
  3. draft potential code to implement the idea
  4. debug and finalize the solution.

Wukong JS 1.5 loses on time frequently

Hi,

I test it under Winboard 4.6.2, OS is W10 64bits, time control is 1'+1", ponder off. Other JS engines like Tomitank, Roller and Lozza don't show this problem under the same conditions.

[Event "Computer Chess Game"]
[Site "DESKTOP-VK18VPD"]
[Date "2021.03.04"]
[Round "2"]
[White "Wukong_JS 1.5"]
[Black "Bismark 1.4"]
[Result "0-1"]
[TimeControl "60+1"]
[Annotator "6. -0.14   6... -0.22"]

1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 6. d3 {-0.14/8 5} b5
{-0.22/8 2.7} 7. Bb3 {-0.13/8 4} d5 {-0.25/8 2.6} 8. exd5 {+0.15/9 4} Nxd5
{-0.31/8 2.6} 9. Bxd5 {+0.01/8 4} Qxd5 {-0.17/8 2.6} 10. Nc3 {-0.12/8 3}
Qd7 {-0.04/7 2.5} 11. Qe2 {+0.07/7 3} Qe6 {-0.11/7 2.4} 12. Re1 {+0.05/7 3}
b4 {-0.10/8 2.4} 13. Ne4 {-0.02/8 3} O-O {-0.04/7 2.4} 14. Neg5 {-0.03/7 3}
Bxg5 {-0.08/8 2.4} 15. Bxg5 {-0.14/8 3} Re8 {-0.10/7 2.5} 16. Be3
{-0.12/7 3} Qd5 {+0.20/8 2.3} 17. a3 {-0.19/6 3} Bg4 {+0.46/8 2.2} 18. h3
{-0.29/8 2.8} Bxf3 {+0.62/9 2.3} 19. Qxf3 {-0.33/9 2.8} Qxf3 {+0.63/9 2.2}
20. gxf3 {-0.38/10 2.8} bxa3 {+0.54/9 2.2} 21. Rxa3 {-0.38/8 2.7} Rab8
{+0.23/9 2.1} 22. Rc3 {-0.31/8 2.6} Re6 {+0.52/9 2.1} 23. Rb1 {-0.35/8 2.6}
Rb4 {+0.65/8 2.1} 24. Kf1 {-0.36/8 2.6} f5 {+0.87/9 2.1} 25. Rc4
{-0.30/8 2.5} Rxc4 {+1.31/11 2.0} 26. dxc4 {-0.33/10 2.5} f4 {+1.32/10 2.0}
27. Bc5 {-0.40/9 2.3} Rh6 {+1.20/9 2.0} 28. Ra1 {-0.47/9 2.3} Nd8
{+1.21/9 1.9} 29. Bb4 {-0.18/8 2.2} Nf7 {+0.98/9 1.9} 30. Ke2 {-0.07/8 2.2}
Ng5 {+1.04/9 1.9} 31. h4 {-0.04/9 2.2} Nf7 {+0.79/9 1.9} 32. Kd3
{+0.13/8 2.2} g5 {+0.99/9 1.9} 33. hxg5 {+0.22/8 2.1} Nxg5 {+0.58/8 1.8}
34. Rg1 {+0.10/7 2.1} Rg6 {+0.71/10 1.8} 35. Ba5 {+0.25/8 2.1} c6
{+0.79/9 1.8} 36. Bc3 {+0.35/8 2.0} Kf7 {+1.06/9 1.8} 37. Ra1 {+0.33/7 2.0}
Rd6+ {+0.75/9 1.7} 38. Ke2 {+0.00/8 2.0} c5 {+0.15/10 1.7} 39. Rg1
{+0.00/7 1.9} Kg6 {+1.12/9 1.7} 40. b4 {+0.23/5 1.6} cxb4 {+1.09/10 1.7}
41. Bxb4 {-0.10/6 1.6} Re6 {+1.21/9 1.7} 42. Kd3 {-0.10/5 1.7} h5
{+1.29/9 1.7} 43. Bc5 {-0.01/5 1.5} h4 {+1.95/9 1.7} 44. Rg4 {-0.12/5 1.5}
Kh5 {+2.11/10 1.6} 45. Ke2 {-0.06/6 1.5} h3 {+2.05/10 1.6}
{Black wins on time} 0-1

[Event "Computer Chess Game"]
[Site "DESKTOP-VK18VPD"]
[Date "2021.03.04"]
[Round "3"]
[White "ZZZZZZ 3.5.1"]
[Black "Wukong_JS 1.5"]
[Result "1-0"]
[TimeControl "60+1"]
[Annotator "6. -0.04   6... -0.12"]

1. c4 Nf6 2. d4 e6 3. Nf3 d5 4. Nc3 c6 5. Bg5 h6 6. Bxf6 {-0.04/9 3} Qxf6
{-0.12/9 4} 7. cxd5 {-0.04/8 3} cxd5 {+0.10/9 3} 8. Rc1 {-0.01/8 3} Bb4
{+0.43/8 3} 9. Qa4+ {+0.01/8 2.0} Nc6 {+0.52/8 3} 10. Ne5 {+0.02/9 2.0} O-O
{+0.64/9 3} 11. Nxc6 {+0.24/9 2.0} Bxc3+ {+0.57/9 3} 12. Rxc3 {+0.40/8 2.0}
Bd7 {+0.57/9 3} 13. Ne7+ {+0.31/9 2.0} Qxe7 {+0.67/10 3} 14. Rc7
{-0.12/9 2.0} Bxa4 {+0.68/11 3} 15. Rxe7 {-0.10/11 2.0} Bc6 {+0.68/9 2.9}
16. Rc7 {-0.10/11 2.0} a5 {+0.55/9 2.8} 17. e3 {-0.02/10 2.0} Rfe8
{+0.60/9 2.8} 18. Be2 {-0.03/9 2.0} Kf8 {+0.61/9 2.7} 19. Kd2
{+0.02/10 2.0} Re7 {+0.57/10 2.7} 20. Rxe7 {+0.04/11 2.0} Kxe7
{+0.59/10 2.6} 21. Rc1 {+0.05/10 2.0} Kd6 {+0.61/8 2.6} 22. Bd3
{+0.02/8 2.1} Rf8 {+0.59/8 2.5} 23. h3 {+0.03/8 2.0} Re8 {+0.58/10 2.4} 24.
b3 {+0.04/9 2.0} Rf8 {+0.66/8 2.4} 25. Be2 {+0.05/8 2.0} f6 {+0.68/8 2.6}
26. a3 {+0.06/9 2.1} e5 {+0.66/9 2.3} 27. b4 {+0.06/7 1.0} axb4
{+0.60/9 2.3} 28. axb4 {+0.00/9 1.1} Bd7 {+0.58/9 2.2} 29. Ra1
{+0.12/8 1.0} e4 {+0.59/8 2.2} 30. Ra7 {+0.14/7 1.0} Rb8 {+0.58/8 2.1} 31.
Bd1 {+0.27/8 2.4} Ke6 {+0.60/9 2.1} 32. g3 {+0.44/8 1.0} Kd6 {+0.69/9 2.1}
33. g4 {+0.35/9 1.0} f5 {+0.67/8 2.0} 34. f4 {+0.33/9 1.0} fxg4
{+0.75/9 2.0} 35. Bxg4 {+0.01/11 1.0} Bc6 {+0.71/10 2.0} 36. h4
{-0.04/8 1.0} g6 {+0.74/9 1.9} 37. h5 {+0.20/9 1.0} gxh5 {+0.65/10 1.9} 38.
Bxh5 {+0.06/10 1.0} Rg8 {+0.65/9 1.9} 39. b5 {+0.14/10 1.0} Bxb5
{+0.59/11 1.8} 40. Rxb7 {+0.14/10 1.0} Bd7 {+0.59/9 1.8} 41. Ra7
{+0.13/9 1.0} Rg2+ {+0.62/9 1.8} 42. Ke1 {+0.13/9 1.0} Rc2 {+0.69/8 1.8}
43. Ra6+ {+0.16/9 1.0} Rc6 {+0.53/10 1.7} 44. Ra8 {+0.14/9 1.1} Rc8
{+0.61/8 1.7} 45. Ra7 {+0.00/9 1.0} Rc3 {+0.62/8 1.7} 46. Kd2
{+0.14/10 1.0} Rd3+ {+0.71/9 1.7} 47. Ke2 {+0.14/10 1.0} Bb5 {+0.67/9 1.6}
48. Kf2 {+0.17/10 1.0} Rd2+ {+0.62/6 1.2} 49. Kg1 {+0.18/9 1.0} Bd7
{+0.57/7 1.2} 50. Ra8 {+0.18/10 1.0} Rd3 {+0.43/6 1.2} 51. Kf2
{+0.18/9 1.2} Rd2+ {+0.00/6 1.2} 52. Kf1 {+0.24/8 1.0} Rh2 {+0.65/5 1.2}
53. Ra6+ {+0.18/9 1.0} Bc6 {+0.37/6 1.2} 54. Be8 {+0.48/12 1.0} Rc2
{+0.23/9 1.2} 55. f5 {+0.20/12 1.0} Rc1+ {+0.00/8 1.2} 56. Kg2
{+0.24/10 1.0} Rc2+ {+0.00/9 1.2} 57. Kh3 {+0.76/12 1.0} Kc7 {-0.16/9 1.2}
58. Bxc6 {+0.76/12 1.0} Rxc6 {-0.46/12 1.2} 59. Rxc6+ {+0.76/11 1.0} Kxc6
{-1.29/15 1.2} 60. Kg4 {+2.01/23 1.0} Kd6 {-1.65/15 1.2} 61. Kh5
{+2.33/22 1.0} Ke7 {-2.22/16 1.2} 62. Kg6 {+2.52/23 1.0} Kf8 {-2.24/15 1.2}
63. Kxh6 {+2.72/19 1.3} Kf7 {-3.82/18 1.2} 64. Kg5 {+2.72/18 1.0} Kg7
{-3.50/16 1.3} 65. f6+ {+7.58/20 1.0} Kf7 {-4.31/17 1.2} 66. Kf5
{+11.75/21 1.0} Kf8 {-10.49/17 1.2} 67. Ke6 {+11.83/18 1.0}
{White wins on time} 1-0

[Event "Computer Chess Game"]
[Site "DESKTOP-VK18VPD"]
[Date "2021.03.04"]
[Round "4"]
[White "Wukong_JS 1.5"]
[Black "JARS 1.75a"]
[Result "0-1"]
[TimeControl "60+1"]
[Annotator "5. -0.41   2... -0.10"]

1. d4 d5 2. e3 Bf5 {-0.10/8 2.9} 3. Nf3 e6 {-0.31/7 3} 4. c4 Nc6
{+0.45/6 2.6} 5. cxd5 {-0.41/3 9} exd5 {+0.30/7 2.6} 6. Nc3 {-0.36/5 5} a6
{+0.46/6 2.8} 7. Bd2 {-0.07/5 5} Nf6 {+0.39/6 2.1} 8. Qb3 {-0.23/4 6} Bb4
{+0.54/6 2.5} 9. Ne5 {-0.10/5 4} Qd6 {+0.34/6 2.4} 10. Nxc6 {-0.21/5 4}
Bxc3 {+0.33/7 2.0} 11. Qxb7 {+0.33/5 4} Bxd2+ {-0.11/8 2.7} 12. Kxd2
{+0.37/5 4} O-O {+0.04/7 2.2} 13. Bxa6 {+0.74/5 4} Ng4 {-0.14/6 1.9} 14. f4
{+0.67/4 4} Rfe8 {+0.38/6 2.2} 15. Rhe1 {+0.54/4 3} Nxh2 {+0.60/6 2.0} 16.
Bd3 {+0.64/3 5} Bxd3 {+0.92/6 1.4} 17. Kxd3 {+0.36/5 4} Ra4 {+0.89/6 1.4}
18. b3 {+0.55/5 2.6} Ra3 {+0.49/7 1.3} 19. Ne5 {+0.76/6 2.2} f6
{+0.46/7 1.3} 20. Nc6 {+0.58/7 2.0} Qd7 {+0.38/7 1.3} 21. Nb4 {+0.86/6 2.0}
Ra5 {+0.19/7 1.4} 22. Na6 {+0.85/5 2.1} Rc8 {+0.50/6 1.3} 23. Nc5
{+0.98/5 2.0} Qf5+ {-0.21/7 1.3} 24. e4 {+0.97/5 2.0} dxe4+ {-1.36/8 1.3}
25. Qxe4 {+0.97/4 2.5} Qg4 {-1.36/7 1.3} 26. b4 {+1.29/4 2.3} Ra3+
{-0.32/7 1.3} 27. Kd2 {+1.26/4 2.3} Rb8 {-0.12/6 1.2} 28. Qd5+
{+1.26/3 1.6} Kh8 {+0.54/6 1.2} 29. Nd3 {+1.13/4 1.6} Qg6 {+0.54/6 1.2} 30.
Re3 {+1.33/4 1.6} Ng4 {+0.69/6 1.2} 31. Ne5 {+1.36/5 1.7} Qc2+
{+3.31/8 1.2} 32. Kxc2 {-3.27/7 1.6} Nxe3+ {+3.51/9 1.2}
{Black wins on time} 0-1

[Event "Computer Chess Game"]
[Site "DESKTOP-VK18VPD"]
[Date "2021.03.04"]
[Round "7"]
[White "Winglet 0.0"]
[Black "Wukong_JS 1.5"]
[Result "1-0"]
[TimeControl "60+1"]
[Annotator "6. -0.23   6... +0.56"]

1. d4 Nf6 2. c4 e6 3. Nf3 b6 4. g3 Ba6 5. b3 Bb4+ 6. Bd2 {-0.23/8 0.8} Nc6
{+0.56/8 4} 7. e3 {-0.21/8 2.5} Bxd2+ {+0.66/8 4} 8. Nbxd2 {+0.15/9 3} Bb7
{+0.52/8 3} 9. Bd3 {+0.17/9 4} Nb4 {+0.63/8 3} 10. Qe2 {+0.13/8 3} Nxd3+
{+0.64/8 3} 11. Qxd3 {+0.14/10 3} d5 {+0.62/9 3} 12. O-O {+0.14/8 4} Qd6
{+0.62/9 3} 13. c5 {+0.14/8 3} bxc5 {+0.77/10 3} 14. Qb5+ {+0.24/8 3} Bc6
{+0.66/9 3} 15. Qxc5 {+0.40/9 3} Qxc5 {+0.67/9 3} 16. dxc5 {+0.37/9 1.9}
Rg8 {+0.61/8 3} 17. Nd4 {+0.63/9 3} Bb7 {+0.36/9 2.9} 18. N2f3
{+0.57/8 2.3} c6 {+0.31/8 2.8} 19. Rac1 {+0.79/8 4} Ke7 {+0.41/8 2.8} 20.
a4 {+0.91/9 3} Nd7 {+0.48/8 2.7} 21. Rfe1 {+1.09/8 1.7} e5 {+0.53/8 2.6}
22. Nf5+ {+1.10/9 2.0} Ke6 {+0.51/8 2.6} 23. g4 {+0.98/8 4} h6
{+0.51/7 2.5} 24. e4 {+1.02/8 2.7} d4 {+0.57/6 2.5} 25. g5 {+0.89/8 2.7}
Rab8 {+0.61/7 2.4} 26. b4 {+0.87/8 2.3} h5 {+0.57/7 2.4} 27. b5
{+0.96/7 2.5} d3 {+0.33/8 2.3} 28. bxc6 {+2.31/8 2.5} d2 {-0.14/8 2.3} 29.
Rcd1 {+2.42/8 2.4} Bxc6 {-1.37/9 2.3} 30. N3d4+ {+2.31/10 1.8} exd4
{-1.24/11 2.2} 31. Nxd4+ {+2.49/11 2.6} Ke7 {-1.24/10 2.2} 32. Nxc6+
{+2.59/10 2.1} Ke8 {-1.24/9 2.1} 33. Rxd2 {+2.59/8 2.1} Rc8 {-1.24/8 2.1}
34. Red1 {+2.80/9 1.7} Rc7 {-2.10/9 2.0} 35. Rxd7 {+2.85/9 2.2} Rxd7
{-2.14/11 2.0} 36. Rb1 {+3.05/10 1.4} Rc7 {-2.15/10 2.0} 37. Rb8+
{+3.15/11 2.5} Kd7 {-1.98/9 1.9} 38. Rxg8 {+3.24/10 1.4} Rxc6
{-1.88/10 1.9} 39. Rxg7 {+3.13/11 2.2} Ke8 {-1.88/8 1.8} 40. Rg8+
{+3.24/10 1.6} Ke7 {-1.83/10 1.9} 41. Ra8 {+3.30/11 2.2} Ra6 {-1.83/9 1.9}
42. c6 {+3.17/11 1.9} Kd6 {-1.71/9 1.8} 43. c7 {+3.17/10 1.6} Kxc7
{-1.52/9 1.8} 44. Rf8 {+3.28/10 1.9} Rxa4 {-1.53/6 1.4} 45. Rxf7+
{+3.36/10 1.0} Kd6 {-1.56/5 1.4} 46. f3 {+3.36/10 1.7} Ra5 {-1.50/5 1.3}
47. Rf6+ {+3.52/9 1.4} Ke7 {-1.52/5 1.3} 48. h4 {+4.15/10 1.0} Ra1+
{-1.87/6 1.4} 49. Kg2 {+4.47/9 1.6} Rd1 {-2.16/6 1.3} 50. Rh6
{+4.62/10 1.2} Rd6 {-2.15/5 1.4} 51. Rxh5 {+4.74/11 1.0} Rd2+ {-2.51/5 1.4}
52. Kg3 {+4.75/10 1.5} Ke6 {-2.69/5 1.3} 53. Rh7 {+4.75/10 1.7} a5
{-2.88/6 1.4} 54. Ra7 {+4.75/10 1.4}
{White wins on time} 1-0

[Event "Computer Chess Game"]
[Site "DESKTOP-VK18VPD"]
[Date "2021.03.04"]
[Round "8"]
[White "KasparovChess 1.0.0"]
[Black "Wukong_JS 1.5"]
[Result "1-0"]
[TimeControl "60+1"]
[Annotator "6. +0.10   6... +0.19"]

1. c4 c5 2. Nf3 Nc6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 e6 6. e4 {+0.10/6 3} Bc5
{+0.19/6 4} 7. Nxc6 {+0.25/6 3} dxc6 {+0.21/8 4} 8. Qxd8+ {+0.40/7 3} Kxd8
{+0.22/8 4} 9. Bg5 {+0.30/7 2.9} e5 {+0.32/7 3} 10. f4 {+0.40/7 2.8} Be3
{+0.40/9 3} 11. fxe5 {+0.35/7 2.8} Bxg5 {+0.51/10 3} 12. exf6 {+0.35/7 2.7}
Bxf6 {+0.51/8 3} 13. O-O-O+ {+0.25/8 2.7} Ke7 {+0.56/8 3} 14. Bd3
{+0.25/7 2.6} Be6 {+0.51/8 3} 15. Na4 {+0.20/7 2.6} Bg4 {+0.71/7 3} 16.
Rde1 {+0.20/7 2.5} Rhd8 {+0.58/6 3} 17. Kc2 {+0.20/7 2.4} Bd4 {+0.65/7 2.9}
18. Nc3 {+0.10/6 2.4} a5 {+0.63/7 2.8}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1.3} 47. Rh7 {+0.35/6 1.5} Bd7 {+0.72/5 1.3} 48.
Rf2 {+0.40/6 1.5} Be8 {+0.51/5 1.4} 49. Rg7 {+0.50/6 1.5} R7e6
{+0.57/5 1.4} 50. Rg2 {+0.55/6 1.5} Rg6 {+0.65/5 1.4} 51. Rh7 {+0.45/7 1.5}
Kd6 {+0.61/5 1.4} 52. Rf2 {+0.55/6 1.4} g4 {+0.51/4 1.4} 53. Kb1
{+0.55/6 1.5} Rg8 {+0.50/4 1.3} 54. Rf1 {+0.55/6 1.4}
{White wins on time} 1-0

[Event "Computer Chess Game"]
[Site "DESKTOP-VK18VPD"]
[Date "2021.03.04"]
[Round "9"]
[White "Wukong_JS 1.5"]
[Black "Cleo 0.1"]
[Result "0-1"]
[TimeControl "60+1"]
[Annotator "6. -0.10   6... -0.15"]

1. e4 c5 2. Ne2 d6 3. Nbc3 Nf6 4. d3 Nc6 5. d4 cxd4 6. Nxd4 {-0.10/10 4} e5
{-0.15/6 3} 7. Nxc6 {+0.16/9 3} bxc6 {-0.17/6 3} 8. Bc4 {+0.11/7 3} Nxe4
{-0.02/5 2.9} 9. Nxe4 {+0.15/9 3} d5 {-1.33/6 2.9} 10. Qh5 {+0.11/8 3} Qe7
{+0.15/6 2.7} 11. Bg5 {-0.08/8 3} Qb4+ {+0.45/6 2.6} 12. Nd2 {-0.90/8 3}
dxc4 {+0.52/6 2.6} 13. O-O-O {-1.01/8 2.9} Rb8 {+0.77/6 2.5} 14. Nxc4
{-1.25/10 2.9} Be6 {+0.77/5 2.4} 15. b3 {-1.25/8 2.8} Bxc4 {+1.53/6 2.4}
16. bxc4 {-2.16/9 2.8} Qa3+ {+2.03/5 2.3} 17. Kd2 {-2.04/10 2.7} Bb4+
{+1.89/5 2.2} 18. Ke2 {-2.04/9 2.7} Qxa2 {+2.23/6 2.2} 19. Kf1
{-2.04/8 2.6} Qxc4+ {+2.13/5 2.1} 20. Qe2 {-1.98/8 2.5} Qe6 {+2.13/6 2.0}
21.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 {+0.57/7 1.2} 49. Ra7+
{-0.93/8 1.6} Kb4 {+0.57/6 1.2} 50. Rb7+ {-0.93/8 1.6} Kc3 {+0.44/6 1.2}
51. Rc7+ {-1.06/8 1.5} Kb2 {+0.54/6 1.2} 52. Rc6 {-0.84/5 1.1} Rh6
{+0.60/8 1.2} 53. g4 {-0.95/5 1.2} Ka3 {+0.80/7 1.2} 54. Ra6+ {-1.20/5 1.2}
Kb4 {+0.72/6 1.2} 55. Rb6+ {-1.17/6 1.2} Kc4 {+0.79/6 1.2} 56. Kf4
{-1.28/6 1.2} Kc3 {+0.77/7 1.2} 57. Rc6+ {-1.06/5 1.3} Kd2 {+0.74/6 1.1}
58. Rb6 {-1.23/7 1.2} Kc2 {+0.65/7 1.1} 59. Rc6+ {-1.41/6 1.2} Kb1
{+0.57/6 1.1} 60. Kf5 {-1.24/6 1.1} b2 {+0.74/8 1.1} 61. f4 {-1.62/6 1.1}
Rh2 {+0.94/7 1.1} 62. Rc7 {-1.72/6 1.2} Ka2 {+0.94/7 1.1} 63. Ra7+
{-2.15/6 1.2} Kb3 {+0.94/6 1.1} 64. Rb7+ {-2.29/6 1.3} Kc2 {+3.74/6 1.1}
65. Rc7+ {-2.86/6 1.1} Kd2 {+3.70/6 1.1} 66. Rb7 {-2.86/5 1.2} Kc1
{+3.87/7 1.1} 67. Rc7+ {-2.79/7 1.2} Kd1 {+3.40/7 1.1} 68. Rb7
{-1.35/5 1.1} Rc2 {+3.02/7 1.1} 69. Kxf6 {-2.36/7 1.2} Kc1 {+3.20/7 1.1}
70. g5 {-3.55/7 1.1} b1=Q {+3.98/9 1.1} 71. Rxb1+ {-3.72/8 1.2} Kxb1
{+4.07/9 1.1} 72. f5 {-3.72/7 1.2} Rg2 {+4.33/9 1.1} 73. g6 {-3.73/7 1.1}
hxg6 {+4.20/9 1.1}
{Black wins on time} 0-1

[Event "Computer Chess Game"]
[Site "DESKTOP-VK18VPD"]
[Date "2021.03.05"]
[Round "11"]
[White "Wukong_JS 1.5"]
[Black "Monochrome r203"]
[Result "0-1"]
[TimeControl "60+1"]
[Annotator "6. +0.38   6... -0.34"]

1. e4 c5 2. Nf3 Nc6 3. Bb5 g6 4. O-O Bg7 5. d3 Nf6 6. Nc3 {+0.38/7 6} Qb6
{-0.34/5 2.6} 7. Nd2 {+0.42/7 3} Nd4 {-0.05/6 2.6} 8. Nc4 {+0.17/8 3} Qe6
{+0.16/5 2.5} 9. Ne3 {+0.19/8 3} g5 {+0.17/5 2.5} 10. Bc4 {+0.39/8 3} Qe5
{+0.23/5 2.4} 11. Ned5 {+0.37/7 3} Nxd5 {+0.14/5 2.4} 12. exd5 {+0.53/9 3}
b5 {+0.00/5 2.4} 13. Bxb5 {+0.99/7 4} Nxb5 {+0.05/5 2.3} 14. Nxb5
{+0.99/9 3} O-O {-1.34/6 2.3} 15. Re1 {+0.95/6 3} Qb8 {-1.64/6 2.3} 16. a4
{+1.08/7 3} a6 {-1.70/6 2.2} 17. Nc3 {+1.06/7 2.9} h6 {-1.55/6 2.2} 18.
Rxe7 {+0.99/7 2.7} Qd6 {-0.63/6 2.2} 19. Qe2 {+0.99/7 3} Bb7 {-0.53/6 2.1}
20. Bd2 {+0.95/7 2.9} f5 {-0.40/6 2.1} 21. Re1 {+1.15/7 2.4} Bf6
{-0.41/6 2.1} 22. Re3 {+1.09/8 2.3} g4 {-0.41/6 2.1} 23. Rg3 {+1.27/8 2.3}
h5 {-0.29/6 2.0} 24. Bh6 {+1.22/7 2.3} Rf7 {+0.00/7 2.0} 25. Bd2
{+0.00/8 2.2} Bxc3 {+0.85/6 2.0} 26. bxc3 {-0.14/9 2.2} f4 {+0.93/7 2.0}
27. Bxf4 {-0.20/10 2.2} Qxf4 {+0.83/7 1.9} 28. c4 {-0.20/8 2.1} Raf8
{+0.53/7 1.9} 29. Rf1 {-0.17/7 2.0} Qd4 {+0.44/6 1.9} 30. h3 {-0.03/7 2.0}
Rg7 {+0.27/7 1.9} 31. Rb1 {-0.11/8 1.9} d6 {+0.00/7 1.8} 32. hxg4
{-0.13/7 1.9} hxg4 {+0.24/7 1.8} 33. Qe6+ {-0.16/7 1.9} Kh7 {+0.17/6 1.8}
34. Qe2 {-0.10/7 1.9} Rf4 {+0.37/6 1.8} 35. Re3 {-0.03/7 1.9} Bc8
{+0.19/6 1.8} 36. Re8 {+0.01/7 1.8} Bd7 {+0.81/7 1.7} 37. Ra8 {+0.33/8 1.8}
Rgf7 {+0.94/7 1.7} 38. Rf1 {-0.12/8 1.9} Kg7 {+1.01/6 1.7} 39. g3
{+0.38/8 1.7} Rf3 {+0.38/7 1.7} 40. Kg2 {+0.38/6 1.7} a5 {+0.16/6 1.7} 41.
Rxa5 {+0.51/5 2.7} Qf6 {+0.10/6 1.8} 42. Ra8 {+0.51/7 1.7} Kg6
{+0.00/6 1.6} 43. Rg8+ {+0.56/6 1.7} Kh7 {+0.00/7 1.6} 44. Ra8
{+0.00/7 1.7} Re7 {-0.01/6 1.6} 45. Qd2 {+0.56/3 2.7} Kg7 {-0.08/5 1.8} 46.
Kg1 {+0.58/5 1.7} Kg6 {+0.07/6 1.6} 47. a5 {+0.66/3 2.1} Rf7 {+0.00/6 1.6}
{Black wins on time} 0-1

[Event "Computer Chess Game"]
[Site "DESKTOP-VK18VPD"]
[Date "2021.03.05"]
[Round "12"]
[White "Wukong_JS 1.5"]
[Black "Lovelace 1.0 r2"]
[Result "0-1"]
[TimeControl "60+1"]
[Annotator "6. -0.14"]

1. e4 c6 2. d4 d5 3. e5 c5 4. dxc5 e6 5. a3 Bxc5 6. b4 {-0.14/7 4} Bb6 7.
Nf3 {-0.35/7 3} a5 8. bxa5 {-0.13/8 3} Rxa5 9. Bd2 {-0.01/8 3} Rc5 10. Bb4
{+0.67/9 3} Ba5 11. Nbd2 {+0.28/8 3} Bxb4 12. axb4 {+0.27/9 3} Rc3 13. Nb3
{+0.34/7 3} Qb6 14. Qd4 {+0.33/8 2.9} Qxd4 15. Nbxd4 {+0.51/9 3} Ne7 16.
Kd2 {+0.78/9 2.8} Rc7 17. Nb5 {+1.32/8 2.7} Rc6 18. Nd6+ {+1.32/10 2.7} Kf8
19. Ra8 {+1.32/9 3} Nd7 20. Bb5 {+1.12/9 2.6} Nb6 21. Bxc6 {+1.03/9 2.5}
Nxa8 22. Bxb7 {+0.88/9 2.5} Bxb7 23. Nxb7 {+0.92/9 2.5} Ng6 24. Nc5
{+1.00/9 2.4} Nb6 25. Ra1 {+1.00/7 2.5} h5 26. Kc3 {+1.18/7 2.3} h4 27. Ra6
{+1.30/8 2.2} Nc8 28. Ra8 {+1.29/8 2.2} Ke7 29. h3 {+1.24/8 2.2} Nf4 30.
Na4 {+1.34/7 2.2} Ng6 31. Kd2 {+1.40/8 2.1} f5 32. Nc5 {+1.55/7 2.1} Nf4
33. Nxh4 {+2.17/7 2.1} Rd8 34. Nd3 {+2.43/8 2.0} Nxd3 35. cxd3
{+2.18/9 2.3} g5 36. Nf3 {+2.45/10 1.9} g4 37. Nd4 {+2.58/9 2.1} Re8 38.
hxg4 {+2.71/10 1.8} fxg4 39. Ke3 {+2.89/9 1.8} Rg8 40. Rb8 {+2.93/8 1.8}
Kf7 41. Kf4 {+3.20/8 1.8} Re8 42. Kxg4 {+3.30/8 1.8} Rg8+ 43. Kf4
{+3.49/9 1.9} Ne7 44. Rxg8 {+3.58/10 1.7} Nxg8 45. b5 {+3.96/11 1.7} Ne7
46. b6 {+3.96/9 1.7} Ng6+ 47. Ke3 {+3.86/9 1.7} Nxe5 48. b7 {+3.96/7 1.6}
Nd7 49. Nc6 {+3.96/5 1.5} Kf6 50. b8=Q {+4.12/7 2.1} Nxb8
{Black wins on time} 0-1

How to start a game from a fen position

I have been looking for a decent engine that works from a browser for a long time. Most of them are very weak or require nodeJS. Thanks for this outstanding engine that works really well! My question is what is the syntax to send the engine a fresh startFen? I have been using the chessboardJS integration.

I tried this:
var bdview = '3r2k1/pbp2p2/1p6/n1bp1P1Q/6P1/P1q4P/B1P4K/4RR2 w - - 0 1';
board.position(engine.bdview);
and I also tried let startFen = bdview;

but they don't work. I get snapbacks when I move the pieces. Any help is appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.