Hi, talkchess community!
I'd like to introduce you the bare minimum chess program I've written in javascript that can be played online here: https://maksimkorzh.github.io/bmcp_js/
This won't be interesting to those who writes 2500+ Elo rated engines, but for beginners who wants to write simple and minimalist chess for fun.
It doesn't support castling and enPassant captures for simplicity. Move legality checking is also absent, so feel free to cheat)
I'll appreciate your feedbacks!
Take care!
Bare minimum chess program in javascript
Moderators: hgm, Rebel, chrisw
-
- Posts: 771
- Joined: Sat Sep 08, 2018 5:37 pm
- Location: Ukraine
- Full name: Maksim Korzh
Bare minimum chess program in javascript
Didactic chess engines:
https://www.chessprogramming.org/Maksim_Korzh
Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ
https://www.chessprogramming.org/Maksim_Korzh
Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ
-
- Posts: 6442
- Joined: Tue Jan 09, 2007 12:31 am
- Location: PA USA
- Full name: Louis Zulli
Re: Bare minimum chess program in javascript
Good start!
Not handling all legal moves while allowing illegal moves is undesirable.
Also, after I (illegally) captured using a pinned pawn, the engine moved its (unprotected) Queen adjacent to my King and announced checkmate, ending the game. Not only could I have captured the Queen, but my King also had a square to flee to. So mate-detection code needs work.![Wink :wink:](./images/smilies/icon_wink.gif)
Not handling all legal moves while allowing illegal moves is undesirable.
Also, after I (illegally) captured using a pinned pawn, the engine moved its (unprotected) Queen adjacent to my King and announced checkmate, ending the game. Not only could I have captured the Queen, but my King also had a square to flee to. So mate-detection code needs work.
![Wink :wink:](./images/smilies/icon_wink.gif)
-
- Posts: 588
- Joined: Fri Mar 30, 2018 7:20 am
- Full name: Andreas Matthies
Re: Bare minimum chess program in javascript
Pawn promotion seems missing.
-
- Posts: 771
- Joined: Sat Sep 08, 2018 5:37 pm
- Location: Ukraine
- Full name: Maksim Korzh
Re: Bare minimum chess program in javascript
Thanks for your feed back. To be exact it's not start bat rather the end) I've been doing chess programming for 3 years, wrote several engines in C with full FIDE rules. This program is more like a summary of my overall chess programming experience)zullil wrote: ↑Sat Jun 08, 2019 12:29 pm Good start!
Not handling all legal moves while allowing illegal moves is undesirable.
Also, after I (illegally) captured using a pinned pawn, the engine moved its (unprotected) Queen adjacent to my King and announced checkmate, ending the game. Not only could I have captured the Queen, but my King also had a square to flee to. So mate-detection code needs work.![]()
Didactic chess engines:
https://www.chessprogramming.org/Maksim_Korzh
Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ
https://www.chessprogramming.org/Maksim_Korzh
Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ
-
- Posts: 771
- Joined: Sat Sep 08, 2018 5:37 pm
- Location: Ukraine
- Full name: Maksim Korzh
Re: Bare minimum chess program in javascript
Thanks for reporting bug, RubiChess, already fixed. I've overlooked that while porting code from C to JS
Didactic chess engines:
https://www.chessprogramming.org/Maksim_Korzh
Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ
https://www.chessprogramming.org/Maksim_Korzh
Chess programming YouTube channel:
https://www.youtube.com/channel/UCB9-pr ... KKqDgXhsMQ