maksimKorzh / xiangqi-stockfish-template

Array based move generator to play Chienese chess xiangqi with search and evaluation placeholders intended to serve as a bases for the xiangqi stockfish fork development.
GNU General Public License v3.0
5 stars 2 forks source link

Can you make a professional Janggi (korean chess) engine? #2

Closed cjssh1002 closed 3 years ago

maksimKorzh commented 3 years ago

Hi @cjssh1002 re: Janggi's rules are similar to xiangqi rules

re: f you are going to do this, please do janggi as well

re: If you develop a janggi specialized engine, it will be a good insurance for the future.

re: "professional" engine:

So let's say I accept this issue and will keep it open, however I don't promise quick results. Hope you understand.

maksimKorzh commented 3 years ago

@cjssh1002 Did you have a look at current xianqqi stockfish code base? (movegen.cpp in particular)? What do you think?

Let's go the following way:

  1. I embed alpha-beta search
  2. We work on jianggi variant

How about that? I can ping you when done.

Another note: What GUI do you use to play jiangqi with fairy stockfish? I think my CCBridge Arena can be altered to serve as jianggi GUI, did you have a look at my GUI? https://www.youtube.com/watch?v=ZEnVvoXBPho

maksimKorzh commented 3 years ago

No, Fairy Stockfish's code won't work because of bitboards. I'm using array based move generator here. I will search for the rules when the alpha-beta routine is done. Anyway only movegen and eval code would be different while all the rest should be the same.

I'm just wondering why do you need other than Fairy Stockfish engine? Do you want to run engine matches? Does Fairy Stockfish support winboard protocol natively?

maksimKorzh commented 3 years ago

@cjssh1002 A few notes:

  1. Fairy Stockfish is developed by a single person - Fabian Fichter, not by a team as far as I'm aware.
  2. Fairy Stockfish is not the only jiangqi engine, H.G. Muller, maintainer of winboard is now working on jiangqi engine: http://talkchess.com/forum3/viewtopic.php?f=7&t=76465 It should have a very promising evaluation and obviously compatible with winboard.

I clearly understand your requests from the user's perspective, I had something similar in mind which resulted creating my ccbridge arena - a proof of concept gui to play games between UCI/UCCI xiangqi engines, but when I got what I currently have I started feeling even more disappointed then earlier)

Another issue regards to interaction between engine and GUI. I tried uci2wb adapter and it works but it's too complicated for the end user to setup the engine this is probably the reason why Fabian added native CECP support to Fairy Stockfish to run natively in winboard. It's possible to reuse that obviously but anyway with my current skills you can't expect much improvement comared to Fairy Stockfish. The reason for that is that for evaluation I use material and piece-square tables (to give engine an idea of where to develop it's pieces) only. I don't know for sure, but I guess that's something similar to what is used in Fairy Stockfish itself. So the "style" of play would be very very similar to Fairy Stockfish. I just have a faster move generator and potentially might have as good search as Fairy Stockfish uses (but without threads for now). In order to get "interesting" and "human-like" style of play NNUE is needed. Fabian is going to make it for various variants for Fairy Stockfish and I'm gonna reuse it then (I'm too dumb to create my own NNUE).

Just tried to share my concerns as a developer. Btw are you a developer? Did you ever write a chess engine? Did you ever think to do so if not?

maksimKorzh commented 3 years ago

Thanks for your questions. Your request is accepted, however I can't say for sure If I go for implementing jiangqi or not. If yes - you'll be the first person to know about it)

Without having a decent search in the engine thinking about different variants is pointless and I've just started developing search: https://www.youtube.com/watch?v=3sLgdJGJGk0

It takes quite a bit of time to bring it to the state somewhat close to Fairy Stockfish)

maksimKorzh commented 3 years ago

@cjssh1002 I just had a look at jiangi rules at wikipedia, well... it's a different game compared to xiangqi and I've realized that I just don't want to complicate current engine's move generator. However the game itself (jiangqi) seems to be really exciting. Here's the point - despite the fact it's not obvious to be able to play a game in order to create playing engine, still I prefer to master a game at somewhat novice level first. This is what I did before coding xiangqi engine. So to start a jianggi engine I first need to lose around 100 jianggi games as a human player)

Now here's the idea that has just come to my mind - the project you're requesting might be done much faster if we deal on a paid bases (fixed price paid by milestones). You can mail me to freesoft.for.peole@gmail.com for details.

Some benefits you might have in this case:

  1. Engine may be implemented in different programming languages with different purposes in mind, for instance:
  2. Priority (paid projects are prior to hobby projects, so I can drop what I currently do and start working on jianggi project instantly)
  3. Customization & revising (literally on-demand feature requests/upgrades/support etc.)

Potentially this can be turned into commercial project you might want to start selling one day (but in this case it would be a custom stuff, no longer derived from stockfish to avoid licencing issues)

I would say that this is something I'm interested to discuss in particular.

On the other hand on free bases somewhat similar project might occur in a year or two, but again like I can't promise for sure because my hobby stuff flows on it's own - I mean I do something for free IF that is interesting to me and WHEN it is interesting for me and not on demand, hope you understand)

maksimKorzh commented 3 years ago

re: it seems impossible to surpass Fairy Stockfish in the short term

re: Finally, in fact, I am currently developing janggi with the Winboard developer

re: ...because I have to help the Winboard developer...

re: ...as a result, ... users can make donations

Today I played a few jiangqi games versus fairy stockfish - this was really fun) Jiangi has some unique charm no that no other variant have) I managed to beat random mover but obviously got crushed by any stronger levels)))

To be honest making a playing engine for whatever variant is not really that big deal if you have experience with chess programming, however the tricky thing is to set up proper goals ones you start a project. It's still a big issue for me - my original goals are always "simplest possible proof of concept implementation" no matter how complicated project is and this always leads to a working prototype I completely lose interest to after starts initially working. With this current xiangqi stockfish I have the same issue - I already see that I can bring it to somewhat a decent playing strength but unfortunately I can't see much sense in further development for some reason. All I do kind of lives as a youtube show/series and ones it's completed I usually start a new one... I wish I could bring all the stuff I've done so far together into a single product, but it's a complete mystery to me what kind of stuff can lead to a common denominator.

maksimKorzh commented 3 years ago

Hi @cjssh1002 I've made a traditional janggi theme for winboard/xboard: http://talkchess.com/forum3/viewtopic.php?f=2&t=76959 maybe you get interested.

Also this xiangqi stockfish project is now stopped due to some conflicts I have in my head))) So I'm now starting to research janggi and hope to come up with another engine, just like you wanted) I will first port my wukong-xiangqi from JS to C and then alter the movegen to play janggi. It should be at least as strong as HGM's J 0.2b, btw did you already test that?

P.S. It's such a pleasure to watch engines playing janggi with traditional board and pieces!

maksimKorzh commented 3 years ago

Hi @cjssh1002

First of all there's a typo in the email, it should be: freesoft.for.people@gmail.com (peoPle, not peole)

re: images on windows 10

Start with board texture, this should be trivial:

  1. Open View=>Board Themes...
  2. Specify Light-Square texture and Dark-Square texture (pick up "Janggi.bmp" from /theme_winboard folder), click on Use board textures checkbox.

It should display the board texture. If not try a whatever custom ".bmp" file with the same size (width and height in pixels) this would tell whether the issue in the texture encoding or not.

  1. Specify Directory with piece bitmaps as well Screenshot from 2021-03-27 12-25-06

It SHOULD work, please let me know if it helps.

re: engine related questions

Looking forward.

P.S. Email is also fine if you prefer private discussion.

maksimKorzh commented 3 years ago

@cjssh1002 I moved the discussion here: https://github.com/maksimKorzh/wukong-janggi/issues/1 This issue would be closed.