Comments (8)
Ok, I'm going to work on recognizing insufficient material. I'll open a pull request when I'm done. By the way, a quick going-over of the search routine did not seem to have LMR. If you can verify this, I'll add it.
from demolito.
thanks.
PS: search has reductions already. have a closer look.
from demolito.
OK
from demolito.
Alright, I did a rough draft of detecting insufficient material. It gives a score of 3 cp with KBvK and KNvK.
The diff is here: stockfishdeveloper/Demolito@master...stockfishdeveloper:insufficient_material_detection
Note: According to FIDE rules, KNNK is automatically a draw.
I'll open a pull request if you think this is good enough to commit.
from demolito.
draw by chess rules should not be in the eval, but in the search. same as:
if (ply > 0 && threadHistory[ThreadId].repetition(pos.rule50()))
return DrawScore[us];
just need to extend it to include draw by insufficient material. best to make a wrapper function that handles all the cases: 3-rep, 50-move, insufficient material.
also, we should return the contempt score for draw by chess rules generally (3-rep, 50-move, insufficient material, stalemate). we don't want to special case or hardcode.
from demolito.
I tried putting the draw detection just after the 50-move rule detection--it didn't work.
I tried
if(pos.insufficient_material()) return some contempt factor;
But the output pvs were empty--because at every node it's getting a cutoff as it's insufficient material.
I'll work it out though.
BTW, I really appreciate your guidance--it's worth its weight in gold at this time in my career aspirations.
from demolito.
The root node cannot be game over by chess rules, including draw by chess rules. If that happens, the GUI is bogus. You can safely assume that it only happens at interior nodes, in which case, it may truncate the PV, but that's essentially correct. Anyway, there's a ply > 0 condition to prevent pruning at root, just in case (as it can happen for two-fold repetition).
from demolito.
OK. Makes sense
from demolito.
Related Issues (20)
- fail low HOT 1
- mobility parametrization
- reduce more when eval is deteriorating
- adjust reduction for history HOT 1
- use pthreads directly HOT 1
- Can't compile HOT 6
- possible 'array out of bounds' in eval.c HOT 1
- encode move_is_capture() in move_t
- I am really sorry but i need help HOT 1
- NUMA
- OpenBench HOT 1
- Demolito playing chess variants, Musketeer Chess
- set default compiler to clang in the makefile HOT 1
- Problems compiling on Raspberry Pi 32 bit HOT 2
- (Question) Do you have linux compatible binaries? HOT 1
- Can't Compile with GCC HOT 1
- Artifacts older than 1 month are automatically deleted HOT 1
- Can you build a Korean chess engine? HOT 3
- index 6 out of bounds for type 'int[6]' HOT 4
- Please add ARMv9.2, SVE2, Dot Product and Neon support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from demolito.