Xiangqi chess engine in javascript - YouTube tutorial series

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

Moderator: Ras

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

Re: Xiangqi chess engine in javascript - YouTube tutorial series

Post by maksimKorzh »

hgm wrote: Mon Jan 25, 2021 2:32 pm
maksimKorzh wrote: Mon Jan 25, 2021 2:13 pmHGM, I don't know whether it works or not bit I hope you would be proud of me...
Well, whether it works or not would not be an unimportant detail for determining that. :wink:

The reason I am now rethinking move generation is that there also exists a game Janggi (Korean Chess), which is very much like Xiangqi (played with the same equipment), but even more awful w.r.t. the location-dependent move rules: Rooks and Cannons there can also move along the diagonal lines that are drawn in the Palace on a traditional board. And that means there effectively are finite-range sliders in that game, as a Rook on d0 could move diagonally to e1 and f2, but not any further, as that is where the diagonal line stops. If each piece could specify a different set of moves (range and direction) for every square it is on, that would make it easier to implement such weirdness.
Yup, those rules definitely seem to be weird.
I don't know but IMO xiangqi has just perfect rules, now I compare with classical chess - xiangqi is richer from the positional play.
I mean classical chess in comparison seem to be just a tactical exercise. This is definitely not so but in comparison...
There's an interesting explanation of that reason - classical chess represent "battle of two squads" while xiangqi represent "war between two countries" - that's how Chinese explains the difference. So it's the matter of scale.