Skip to content

Commit 1c45d5e

Browse files
author
Oliver Brausch
committed
5.11.7 Simplify mobility eval. Rank seven.
1 parent 47c34f4 commit 1c45d5e

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/Readme.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
OliThink5 (c) Oliver Brausch 03.Jul.2025, ob112@web.de, http://brausch.org
1+
OliThink5 (c) Oliver Brausch 12.Jul.2025, ob112@web.de, http://brausch.org
22

3-
Version: 5.11.6
3+
Version: 5.11.7
44
Protocol: CECP v2 (winboard/xboard)
55
HashSize: 128MB
66
Ponder: Yes
@@ -9,10 +9,13 @@ EndgameTables: No
99
AnalyzeMode: Basic
1010
SearchMethods: Nullmove, Internal Iterative Reduction, Check Extension, LMR
1111
Evaluation: Just mobility and a very simple pawnprogressing evaluation
12-
LinesOfCode: 1295
12+
LinesOfCode: 1294
1313
Stability: 100%
1414
Special thanks to Dann Corbit for his support and contribution.
1515

16+
v5.11.7: changes since 5.11.6:
17+
Simplify mobility eval. Rank seven.
18+
1619
v5.11.6: changes since 5.11.5:
1720
Unify pick method. Reduce code. SEE refactor. Use local occupied. Corner eval for king.
1821

src/olithink.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#define VER "5.11.6"
2-
/* OliThink5 (c) Oliver Brausch 03.Juk.2025, ob112@web.de, http://brausch.org */
1+
#define VER "5.11.7"
2+
/* OliThink5 (c) Oliver Brausch 12.Jul.2025, ob112@web.de, http://brausch.org */
33
#include <stdio.h>
44
#include <string.h>
55
#ifdef _WIN64
@@ -717,12 +717,12 @@ int kmobilf(int c) {
717717
return sfo < 14 ? km : km * (16 - sfo) /4;
718718
}
719719

720-
#define MOBILITY(a, mb) (bitcnt(a) + bitcnt(a & mb) + bitcnt(a & mb & centr2))
720+
#define MOBILITY(a, mb) (bitcnt(a) + bitcnt(a & mb) + bitcnt(a & mb & c3))
721721
/* The eval for Color c. It's almost only mobility. */
722722
int evalc(int c) {
723723
int f, mn = 0, katt = 0, oc = c^1, egf = 10400/(80 + P.sf[c] + P.sf[oc]) + randm;
724724
u64 b, a, cb = P.color[c], ocb = P.color[oc], occ = BOARD, mb = mobilityb(c, occ) & centr;
725-
u64 kn = kmoves[P.king[oc]] & (~P.piece[PAWN]);
725+
u64 kn = kmoves[P.king[oc]] & (~P.piece[PAWN]), c3 = centr2 | rankb[c ? 1 : 6];
726726

727727
b = P.piece[PAWN] & cb;
728728
while (b) {
@@ -751,7 +751,7 @@ int evalc(int c) {
751751
}
752752

753753
occ ^= BIT[P.king[oc]]; //Opposite King doesn't block mobility at all
754-
occ ^= P.piece[QUEEN] & cb; //Own Queen doesn't block mobility for anybody.
754+
occ ^= P.piece[QUEEN]; //Queens don't block mobility for anybody.
755755
b = P.piece[QUEEN] & cb;
756756
while (b) {
757757
f = pullLsb(&b);
@@ -760,7 +760,7 @@ int evalc(int c) {
760760
mn += MOBILITY(a, mb) * egf * egf / 80 / 80;
761761
}
762762

763-
occ ^= RQU & ocb; //Opposite Queen & Rooks don't block mobility for bishop
763+
occ ^= P.piece[ROOK]; //Rooks don't block mobility for bishop
764764
b = P.piece[BISHOP] & cb;
765765
while (b) {
766766
f = pullLsb(&b);
@@ -769,7 +769,6 @@ int evalc(int c) {
769769
mn += MOBILITY(a, mb) << 2;
770770
}
771771

772-
occ ^= P.piece[ROOK]; //Own Rooks and opposite Queen don't block mobility for rook
773772
b = P.piece[ROOK] & cb;
774773
while (b) {
775774
f = pullLsb(&b);

0 commit comments

Comments
 (0)