BMCP 2.0 by CMK

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

BMCP 2.0 by CMK

Post by maksimKorzh »

Hey what's up guys, Code Monkey King's here.

I've released an update of my bare minimum chess program in vanilla JavaScript,
serving as the didactic engine to kick start with for absolute beginners in chess programming.
It drops everything that chess program can drop but it still plays chess and can checkmate
novice players if not careful.

Whats new:
- cleaned up code, improved comments
- pseudo-legal move highlighting
- move validation (finally!)
- string query parameter based "API" to set color and search depth
- fixed minor UI bugs occurring on touch devices

Play online: https://maksimkorzh.github.io/bmcp_js/bmcp_2.0.html
Source code: https://github.com/maksimKorzh/bmcp_js/ ... p_2.0.html
Initial tutorial:

Now the idea behind this update is not just to bring it to somewhat a completed state
but rather to serve as the template for implementing various chess variants, especially
historical one like Chinese chess Xiangqi or Korean chess Janggi.

I already have a draft allowing to embed future variant engine sources:
https://maksimkorzh.github.io/bmcp-variants/

Well, this is it.
Thanks for your attention and take care!
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: BMCP 2.0 by CMK

Post by mvanthoor »

Hi Maksim,

It seems the engine or UI don’t know about castling, or there is a bug somewhere.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
User avatar
maksimKorzh
Posts: 771
Joined: Sat Sep 08, 2018 5:37 pm
Location: Ukraine
Full name: Maksim Korzh

Re: BMCP 2.0 by CMK

Post by maksimKorzh »

mvanthoor wrote: Mon Apr 05, 2021 6:39 pm Hi Maksim,

It seems the engine or UI don’t know about castling, or there is a bug somewhere.
Hi Marcel

Haha))) Did you read the Description? )))
https://maksimkorzh.github.io/bmcp-variants/
It says explicitly: Simplified chess (no castling, no enpassant)

You made my day)))

Btw I plan to implement many variants but share only obfuscated code in public
while the well commented and highly didactic code would be paid.
Not sure how likely does it work (if it ever works) but it's really tempting to try)
I'm now crafting bmcp xiangqi.

What I do looks like fairymax by HGM but the difference is that fairymax is optimized for code size and tries quiet sophisticated
search enhancement (complexity comes from lack of move list, hence move ordering is hard to do...).
BMCP on the contrary aims to be crystal clear and stripping everything possible.
It doesn't even have a quiescence search)

But for variants it's more than enough, especially if you play the variant for the first time.
Also having a feature of highlighting pseudo legal moves would be very beneficial because
how else do you know where to move a piece if you don't know the rules of the game? )
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: BMCP 2.0 by CMK

Post by mvanthoor »

maksimKorzh wrote: Mon Apr 05, 2021 8:10 pm Hi Marcel

Haha))) Did you read the Description? )))
https://maksimkorzh.github.io/bmcp-variants/
It says explicitly: Simplified chess (no castling, no enpassant)

You made my day)))
Sorry; didn't read it. I played a few moves, zoomed in on my phone. I've never seen any description; must have fallen off the screen somewhere. I now do see it in the web-browser on the computer.
Btw I plan to implement many variants but share only obfuscated code in public
while the well commented and highly didactic code would be paid.
Not sure how likely does it work (if it ever works) but it's really tempting to try)
I'm now crafting bmcp xiangqi.

What I do looks like fairymax by HGM but the difference is that fairymax is optimized for code size and tries quiet sophisticated
search enhancement (complexity comes from lack of move list, hence move ordering is hard to do...).
BMCP on the contrary aims to be crystal clear and stripping everything possible.
It doesn't even have a quiescence search)

But for variants it's more than enough, especially if you play the variant for the first time.
Also having a feature of highlighting pseudo legal moves would be very beneficial because
how else do you know where to move a piece if you don't know the rules of the game? )
Good luck :)
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL