Closed silicon-ninja closed 1 year ago
also tried out with
this ini file still the same issue game result: 4294935296
v0.0.10 should have a fix for this. Thanks again for reporting it.
It still is being a problem while testing out regardless of who wins with this fens.
Black Winning : 8/1Q2b1k1/2p3p1/p2p2P1/8/5PB1/PP3RK1/3r3q w - - 2 37
White Winning :2r3kr/p5Rp/1p3Qn1/4q3/8/2P5/P1P3PP/5R1K b - - 6 27
the game result is-32000
how do i figure it out who won.
same thing goes for draw and on going game.
Draw by stalemate: rn2k1nr/pp4pp/3p4/q1pP4/P1P2p1b/1b2pPRP/1P1NP1PQ/2B1KBNR w Kkq - 0 13
Game still going on: 2r3kr/p4R1p/1p3Qn1/4q3/8/2P5/P1P3PP/5R1K w - - 5 27
the game result is0
thank you.
I will look into it.
This method alone is not enough to distinguish if a game is over or not. So it will return 0 for both an ongoing game and for a drawn game. You'll need to use other methods (like is is_optional_game_end and the number of legal moves) to determine the real result. You can get an idea for how to do it via the javascript api: https://github.com/ianfab/Fairy-Stockfish/blob/master/src/ffishjs.cpp#L294-L325
The longer term plan is to provide an API that is more analagous to the above javascript API, which should help this.
I'm looking into why the method returns -32000 for when white wins. It is my understanding that this should return 32000 (positive)
For the difference between the white wins and black wins, this issue is not caused by my wrapper. I will see if ianfab can help us here.
For example, here is the python that reproduces it:
>>> print(pyffish.version())
(0, 0, 72)
>>> pyffish.game_result("chess", "8/1Q2b1k1/2p3p1/p2p2P1/8/5PB1/PP3RK1/3r3q w - - 2 37", [], False)
-32000
>>> pyffish.game_result("chess", "2r3kr/p5Rp/1p3Qn1/4q3/8/2P5/P1P3PP/5R1K b - - 6 27", [], False)
Ok, I got an answer from ianfab:
All scores are pov scores. So in both cases the person who's turn it is, has lost.
Versions
rustup 1.24.3
0.0.9
But i am not loading it through variants.ini file. Just calling the function using gameResult() and the return type is u32. it gives the max value of u32.
you can actually try running the same exact code and let me know if face the same issue
Output
game result: 4294935296
Thank you.