jhonnold / berserk

UCI Chess Engine written in C
GNU General Public License v3.0
200 stars 30 forks source link

Detect mate with Eval? #501

Closed ChessOverflow closed 10 months ago

ChessOverflow commented 11 months ago
position fen rnbqk1nr/1ppp1ppp/p7/2b1p3/2B1P3/5Q2/PPPP1PPP/RNB1K1NR w KQkq - 0 4
eval
+-------+-------+-------+-------+-------+-------+-------+-------+
|   r   |   n   |   b   |   q   |   k   |       |   n   |   r   |
|   -613|   -484|   -576|  -1074|       |       |   -495|   -655|
+-------+-------+-------+-------+-------+-------+-------+-------+
|       |   p   |   p   |   p   |       |   p   |   p   |   p   |
|       |   -215|   -171|   -138|       |   -187|   -201|    -80|
+-------+-------+-------+-------+-------+-------+-------+-------+
|   p   |       |       |       |       |       |       |       |
|   -128|       |       |       |       |       |       |       |
+-------+-------+-------+-------+-------+-------+-------+-------+
|       |       |   b   |       |   p   |       |       |       |
|       |       |   -587|       |   -246|       |       |       |
+-------+-------+-------+-------+-------+-------+-------+-------+
|       |       |   B   |       |   P   |       |       |       |
|       |       |   +580|       |   +246|       |       |       |
+-------+-------+-------+-------+-------+-------+-------+-------+
|       |       |       |       |       |   Q   |       |       |
|       |       |       |       |       |   +968|       |       |
+-------+-------+-------+-------+-------+-------+-------+-------+
|   P   |   P   |   P   |   P   |       |   P   |   P   |   P   |
|   +109|   +167|   +201|   +154|       |   +168|   +162|    +57|
+-------+-------+-------+-------+-------+-------+-------+-------+
|   R   |   N   |   B   |       |   K   |       |   N   |   R   |
|   +570|   +447|   +532|       |       |       |   +471|   +598|
+-------+-------+-------+-------+-------+-------+-------+-------+
Score: 38cp (white)

Is it possible to detect checkmate from evaluation?

jhonnold commented 11 months ago

That is the job of search.

ChessOverflow commented 11 months ago

But NN Can evaluate difficult positions. Should not be able to evaluate simple positions?

https://github.com/jhonnold/berserk/blob/25bd00c443dc26b7a15ba93da867198fbfa84c11/src/search.h#L26

Using a numerical value instead of alphabet mate does not solve this problem?

jhonnold commented 10 months ago

That is the job of search.

ChessOverflow commented 10 months ago

Unfortunately, instead of giving the answer to my question, you closed it without any logical explanation. We will see that in the future berserk rating will drop due to not paying attention to issues. Good luck

tissatussa commented 10 months ago

@jhonnold well done closing this Issue without further comment .. i think @ChessOverflow is some troll ( https://en.wikipedia.org/wiki/Troll_(slang) ) .. best is to never react, they shouldn't deserve any response 'cause they're not serious or insane or both .. this might even be an AI, triggering any reaction !?

[ i shouldn't have responded to this Issue 'cause we've to avoid any attention ]