1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 09:13:08 +00:00
Commit graph

976 commits

Author SHA1 Message Date
Marco Costalba
02606a8c83 Merge 'passed_pawns' tweaks
Good at both short and long TC

15+0.05
LLR: 2.96 (-2.94,2.94)
Total: 28220 W: 5531 L: 5349 D: 17340

TC 60+0.05
LLR: 2.95 (-2.94,2.94)
Total: 12612 W: 2221 L: 2057 D: 8334

bench: 4857939
2013-05-08 23:04:11 +02:00
Reuven Peleg
e7505324f6 Avoid explicit bitwise operators
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2013-05-05 22:51:18 +02:00
jundery
653c0527a7 Passed pawn eval
Use a stepped function to evaluate bonuses and add the bonus to the
middle game

bench: 4857939
2013-05-05 11:12:04 -06:00
Marco Costalba
0958e5c6d3 Simplify previous condition
No functional change.
2013-05-05 12:31:32 +02:00
Marco Costalba
9fc77bc414 Fix trapped rook condition
A rook is trapped if on rank 1 as is the king.
Currently the condition aloows for the rook
to be also in front of the pawns as long
as king is on first rank.

Verified with short TC test:
LLR: -1.71 (-2.94,2.94)
Total: 23234 W: 4317 L: 4317 D: 14600

Here what it counts is that after 23K games
result is equal.

bench: 4696542
2013-05-05 12:27:11 +02:00
Marco Costalba
3b92159908 Further simplify previous patch
No functional change.
2013-05-04 12:15:31 +02:00
homoSapiensSapiens
e00bb13e85 Merge some conditions
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2013-05-04 11:13:22 +02:00
Marco Costalba
43f67eab5f Merge mobility area tweak
A nice improvment.

Was good at 15+0.05
LLR: 2.96 (-2.94,2.94)
Total: 10731 W: 2176 L: 2040 D: 6515

And at 60"+0.05
LLR: 2.96 (-2.94,2.94)
Total: 10601 W: 1968 L: 1810 D: 6823

bench: 4676606
2013-05-03 10:12:31 +02:00
jhellis3
7323231786 Tweak Mobility Area
Only consider pawns and the king as restricting.
2013-05-01 02:37:50 -05:00
Marco Costalba
06b9140e5c Temporary revert "Expose EvalInfo struct to search"
It is not needed for the release and introduces
a slowdown, although very small.

Probably it will be readded after the release.

No functional change.
2013-04-29 00:55:32 +02:00
Marco Costalba
d810441b35 Expose EvalInfo struct to search
Allow to use EvalInfo struct, populated by
evaluation(), in search.

In particular we allocate Eval::Info on the stack
and pass a pointer to this to evaluate().

Also add to Search::Stack a pointer to Eval::Info,
this allows to reference eval info of previous/next
nodes.

WARNING: Eval::Info is NOT initialized and is populated
by evaluate(), only if the latter is called, and this
does not happen in all the code paths, so care should be
taken when accessing this struct.

No functional change.
2013-04-25 12:57:37 +02:00
Ryan Schmitt
79bcb2ca54 Increase rook/queen on 7th bonus
Shows an increase at 15+0.05
LLR: 3.01 (-2.94,2.94)
Total: 20450 W: 4091 L: 3927 D: 12432

And at 60+0.05
LLR: 2.97 (-2.94,2.94)
Total: 61432 W: 10849 L: 10441 D: 40142

bench: 4493356

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2013-04-25 12:13:17 +02:00
Marco Costalba
f84f04742a Skip a couple of popcount in previous patch
And some little tidy up

No functional change.
2013-04-19 10:31:18 +02:00
Joona Kiiski
818e0b2d2b Try more aggressive version 2013-04-17 07:58:59 +01:00
Joona Kiiski
3e4dfb49a7 Give a small penalty for bishop for each pawn on the same colored square 2013-04-16 21:20:31 +01:00
Joona Kiiski
c2902112e5 Don't treat king safety differently in AnalysisMode
Rationale:

- Current settings seem to make engine *significantly* weaker in analysis mode.
- In practice this setting only has effect when king safety scores are high.
- Even in analysis mode its far more important to know if one side is getting mated,
rather than get evaluation correct with 1cp accuracy.

No functional change
2013-04-09 23:29:58 +02:00
Marco Costalba
9498b2af82 Rescale UCI parameters to 100
And correspondingly modify internal ones
to compensate it.

No functional change.
2013-04-09 23:29:58 +02:00
Marco Costalba
d3fe153fe6 Re-add 'Cowardice' and 'Aggressiveness' UCI options
I have lost my bet with Jean-Paul, so now I re-add
the two options...and I am glad of it :-)

No functional change.
2013-04-09 23:29:58 +02:00
jundery
d39b22927e Use ALL_PIECES value to reference attackedBy
No functional change
2013-03-23 12:17:12 +01:00
Marco Costalba
9a1d5f0f1d Merge Gary's bishop_pin patch
Give a bonus if a bishop can pin a piece or can
give a discovered check through an x-ray attack.

Seems good after 24000 games at 15"+0.05 (single thread):

ELO: 12.30 +- 99%: 5.79 95%: 4.40 LOS: 100.00%
Total: 24000 W: 4931 L: 4082 D: 14987

bench: 4917064
2013-02-20 12:39:09 +01:00
Gary Linscott
ea4e22be1d Merge branch 'master' into bishop_pin_clop 2013-02-19 10:31:52 -05:00
Gary Linscott
dc8c6ea2d1 Bring back original bonus 2013-02-19 10:31:50 -05:00
Marco Costalba
c5ec94d0f1 Update copyright year
No functional change.
2013-02-19 07:54:14 +01:00
Gary Linscott
d570260a28 Back to CLOP average values 2013-02-16 22:36:58 -05:00
Gary Linscott
3922ac2fe4 Add new clop tuned value 2013-02-14 20:29:24 -05:00
Gary Linscott
cd0ecace19 Revert "Use CLOP mean value instead of max"
This reverts commit d0c2faa5fd.
2013-02-13 21:40:38 -05:00
Gary Linscott
d0c2faa5fd Use CLOP mean value instead of max 2013-02-13 12:21:16 -05:00
Gary Linscott
f32f899467 CLOP tuned 2013-02-13 00:12:02 -05:00
Gary Linscott
17b71fe51d Add clop parameters 2013-02-12 00:10:21 -05:00
Gary Linscott
a7cdf7299a Bishop pins only 2013-02-11 10:26:18 -05:00
Gary Linscott
0c06b4509d Slight tweak to king safety. Bench: 5534531 2013-02-08 08:53:13 -05:00
Marco Costalba
0901e12102 Revert "Simplify Evaluation"
This reverts commit 496c7497cb
2013-02-02 06:44:04 +01:00
Gary Linscott
57797822f8 Bring back just bishop pins 2013-01-26 15:35:00 -05:00
Gary Linscott
e83b9075ff Simplify evaluation 2013-01-24 08:54:13 -05:00
Marco Costalba
bff65a211f Retire 'Cowardice' and 'Aggressiveness' UCI options
They are not self-describing and create a lot of user
requests about them.

Given that the values are already well tuned there
is no need to expose them as UCI options.

No functional change.
2013-01-04 17:11:24 +01:00
Marco Costalba
009a0f88e0 Micro-optimization in evaluate_space()
Since &-ing with SpaceMask restricts the set to the home
half of the board, it is possible to use just one popcount
instead of 2 by shifting "safe" to the other half of the
board. This gives a small speedup especially on systems
where hardware popcount is not available.

Patch kindly sent by Richard Vida.

No functional change.
2012-12-31 11:34:18 +01:00
Marco Costalba
3cf6471738 Revert evaluation cache
And return on using TT as backing store for position
evaluations.

Tests (even on single thread) show eval cache was a regression.
In multi thread result should be even worst because eval cache
is a per-thread struct, while TT is shared.

After 4957 games at 15"+0.05 (single thread)
eval cache vs master 969 - 1093 - 2895  -9 ELO

So previous reported result of +18 ELO was probably due to an
issue in the testing framework (a bug in cutechess-cli) that
has been fixed in the meanwhile.

bench: 5386711
2012-12-27 13:57:17 +01:00
Marco Costalba
e82382703c Retire Position::in_check()
It is redundant with Position::checkers()

No functional change.
2012-12-25 17:59:35 +01:00
Marco Costalba
158014b39d Introduce namespace Pawns
And retire old struct PawnTable along the same lines
of previous patch.

No functional change.
2012-12-22 11:38:36 +01:00
Marco Costalba
231f62baf7 Introduce namespace Material
And retire old struct MaterialTable simplifying the code.

No functional change.
2012-12-16 12:58:39 +01:00
Marco Costalba
4e5d834e8e Add eval cache infrastructure
With this patch series we want to introduce a per-thread
evaluation cache to store node evaluation and do not
rely anymore on the TT table for this.

This patch just introduces the infrastructure.

No functional change.
2012-12-01 14:01:20 +01:00
Marco Costalba
e304db9d1e Use self-describing constants instead of numbers
And remove now useless comments.

No functional change.
2012-10-21 11:16:21 +02:00
Marco Costalba
6b909b2343 Move RootColor from Eval to Search
No functional change.
2012-10-21 09:12:02 +02:00
Marco Costalba
eb1a4f11fa Move all Contempt Factor code to search.cpp
Where it is used.

No functional change.
2012-10-13 14:49:01 +02:00
Marco Costalba
cedbd3332a Fix Contempt Factor implementation
First disable Contempt Factor during analysis, then
calculate the modified draw score from the point of
view of the player, so from the point of view of
RootPosition color.

Thanks to Ryan Taker for suggesting the fixes.

No functional change.
2012-10-06 10:12:34 +02:00
Marco Costalba
c9f9262a49 Add experimental contempt factor
This is very crude and very basic: simply in case
of a draw for repetition or 50 moves rule return
a negative score instead of zero according to the
contempt factor (in centipawns). If contempt is
positive engine will try to avoid draws (to use
with weaker opponents), if negative engine will
try to draw. If zero (default) there are no changes.

No functional change.
2012-10-05 08:28:23 +02:00
Gary Linscott
fdbe8006e0 Bonus for rook/queen attacking pawns on same rank
Patch and tuning by Gary Linscott from an idea of Ryan Taker.

Double tested by Gary:

Wins: 3390 Losses: 2972 Draws: 11323
LOS: 99.999992%
ELO: 8.213465 +- 99%: 6.746506 95%: 5.124415
Win%: 51.181792 +- 99%: 0.969791 95%: 0.736740

And by me:

After 5612 games 1255  1085  3271 +11 ELO
2012-09-21 23:25:13 +02:00
Marco Costalba
b84af67f4c Reformat piece values arrays
And rename stuff while there.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2012-08-20 19:17:58 +01:00
Marco Costalba
6b5322ce00 Rename first_1 / last_1 in lsb / msb
It seems more accurate: lsb is clear while 'first
bit' depends from where you look at the bitboard.

And fix compile in case of 64 bits platforms that
do not use BSFQ intrinsics.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2012-07-08 09:36:40 +01:00
Marco Costalba
5f5d056c8f Replace make_square() with operator|(File, Rank)
Be fancy :-)

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2012-06-23 09:17:54 +01:00