]> git.sesse.net Git - stockfish/log
stockfish
15 years agoMovePicker: introduce per square MVV/LVA ordering
Marco Costalba [Fri, 14 Nov 2008 20:49:46 +0000 (21:49 +0100)]
MovePicker: introduce per square MVV/LVA ordering

Just added the infrastructure, no functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix hashfull info
Marco Costalba [Tue, 11 Nov 2008 17:26:15 +0000 (18:26 +0100)]
Fix hashfull info

Do not count has a replacement when a TT entry is
written in an empty slot.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix in ok_to_history(): castle move is not a capture
Marco Costalba [Mon, 10 Nov 2008 18:04:15 +0000 (19:04 +0100)]
Fix in ok_to_history(): castle move is not a capture

It is erroneusly considered a capture because king
moves on the same square of the rook.

Use the correct function Position::move_is_capture()
instead of the open coded (and buggy) one.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoSmall tidyup of TranspositionTable::store()
Marco Costalba [Mon, 10 Nov 2008 14:26:57 +0000 (15:26 +0100)]
Small tidyup of TranspositionTable::store()

Hopefully without bugs this time!

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix a logic bug in TranspositionTable::store()
Marco Costalba [Mon, 10 Nov 2008 14:15:40 +0000 (15:15 +0100)]
Fix a logic bug in TranspositionTable::store()

Make the logic work as advertised in the function
description.

Still a fallback from TT cleanup.

This should be less serious then the one in retrieve(),
but it's still a bug.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoMicro optimization of update_history()
Marco Costalba [Mon, 10 Nov 2008 12:56:49 +0000 (13:56 +0100)]
Micro optimization of update_history()

Remove an useless comparison.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoUse cut-off checks in qsearch as killer moves
Marco Costalba [Mon, 10 Nov 2008 10:06:46 +0000 (11:06 +0100)]
Use cut-off checks in qsearch as killer moves

Killers should not be captures, but checks are not
and are produced also in qsearch.

Use this information, will be useful for move ordering.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoSmaller null move reduction when depth is high
Marco Costalba [Sun, 9 Nov 2008 12:03:52 +0000 (13:03 +0100)]
Smaller null move reduction when depth is high

Lower probability to miss something important.

It seems to increase strenght. Idea form Cyclone.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoIntroduce LastIterations variable
Marco Costalba [Sat, 8 Nov 2008 08:29:07 +0000 (09:29 +0100)]
Introduce LastIterations variable

Is set during the last iteration.

Sometime also during the second last.

During the last iteration is set in the 95% of cases.

During the second last is set in the 40% of cases.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRestore development versioning and LSN filtering
Marco Costalba [Tue, 4 Nov 2008 20:13:00 +0000 (21:13 +0100)]
Restore development versioning and LSN filtering

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix a missed initialization in get_option_value()
Marco Costalba [Tue, 4 Nov 2008 19:59:11 +0000 (20:59 +0100)]
Fix a missed initialization in get_option_value()

Spotted and reported by Dann Corbit.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoStockfish 1.01
Marco Costalba [Mon, 3 Nov 2008 21:25:28 +0000 (22:25 +0100)]
Stockfish 1.01

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix compile under Ubuntu 64bit
Marco Costalba [Mon, 3 Nov 2008 21:05:41 +0000 (22:05 +0100)]
Fix compile under Ubuntu 64bit

Some missing includes.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix a serious bug in TranspositionTable::retrieve()
Marco Costalba [Mon, 3 Nov 2008 18:59:58 +0000 (19:59 +0100)]
Fix a serious bug in TranspositionTable::retrieve()

Reported by Tord Romstad.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRestore development versioning
Marco Costalba [Mon, 3 Nov 2008 18:55:59 +0000 (19:55 +0100)]
Restore development versioning

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRestore LSN filtering
Marco Costalba [Sun, 2 Nov 2008 17:32:56 +0000 (18:32 +0100)]
Restore LSN filtering

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRevert movepick optimizations before to release
Marco Costalba [Sun, 2 Nov 2008 14:58:10 +0000 (15:58 +0100)]
Revert movepick optimizations before to release

More testing is needed and better do not risk
just before release.

Reverted:

Disable LSN filtering as defualt for release
Use MVV/LVA in score_evasions()

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoStockfish 1.0
Marco Costalba [Sun, 2 Nov 2008 14:35:32 +0000 (15:35 +0100)]
Stockfish 1.0

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoDisable LSN filtering as defualt for release
Marco Costalba [Sun, 2 Nov 2008 14:35:02 +0000 (15:35 +0100)]
Disable LSN filtering as defualt for release

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoUse MVV/LVA in score_evasions()
Marco Costalba [Sun, 2 Nov 2008 07:47:27 +0000 (08:47 +0100)]
Use MVV/LVA in score_evasions()

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoDelay SEE for scoring captures
Marco Costalba [Sat, 1 Nov 2008 17:28:49 +0000 (18:28 +0100)]
Delay SEE for scoring captures

Do not calculate SEE on all the moves in MovePicker::score_captures()
but delay until pick_move_from_list() when only the best ones are
double checked against their see value.

If a beta cut-off occurs then we avoid calculating SEE on all
the moves, but just the picked ones.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agosearch: micro optimization
Marco Costalba [Sat, 1 Nov 2008 18:44:17 +0000 (19:44 +0100)]
search: micro optimization

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix a couple of gcc warnings in position.cpp
Marco Costalba [Sat, 1 Nov 2008 11:52:40 +0000 (12:52 +0100)]
Fix a couple of gcc warnings in position.cpp

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoUpdate README to Stockfish
Marco Costalba [Sat, 1 Nov 2008 12:56:01 +0000 (13:56 +0100)]
Update README to Stockfish

Remove Glaurung references.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFinal touches to material.cpp
Marco Costalba [Sat, 1 Nov 2008 10:38:30 +0000 (11:38 +0100)]
Final touches to material.cpp

No functional changes, altough a bit of code reshuffle.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoMaterial: lockless per-thread maps
Marco Costalba [Fri, 31 Oct 2008 16:42:25 +0000 (17:42 +0100)]
Material: lockless per-thread maps

Adds a good bunch of code but should be faster
and scalable because is lockless.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRevert "MovePicker::score_captures() order with SEE when pv"
Marco Costalba [Thu, 30 Oct 2008 14:28:25 +0000 (15:28 +0100)]
Revert "MovePicker::score_captures() order with SEE when pv"

Does not seem to increase the strenght.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoSpace inflate move.cpp
Marco Costalba [Thu, 30 Oct 2008 14:21:53 +0000 (15:21 +0100)]
Space inflate move.cpp

Also a little cleanup.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRevert "Relax time constraints"
Marco Costalba [Thu, 30 Oct 2008 10:38:06 +0000 (11:38 +0100)]
Revert "Relax time constraints"

Does not seem to give an improvment, acutually it seems
a totally neutral change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoPartially space inflate search.cpp
Marco Costalba [Thu, 30 Oct 2008 10:35:44 +0000 (11:35 +0100)]
Partially space inflate search.cpp

Space inflate main remaining functions in search.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRelax time constraints
Marco Costalba [Wed, 29 Oct 2008 16:00:51 +0000 (17:00 +0100)]
Relax time constraints

Allow a seacrh to take a bit more time if needed.

This reduces the chanches of wast all the search time
for the last iteration and also allow to start the last
iteration when we have less time remaining.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoMaterial: micro optimize map reading
Marco Costalba [Wed, 29 Oct 2008 06:52:20 +0000 (07:52 +0100)]
Material: micro optimize map reading

Do only one map walk per read instead of two.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoMaterial: protect global map access with locks
Marco Costalba [Tue, 28 Oct 2008 18:30:57 +0000 (19:30 +0100)]
Material: protect global map access with locks

STL library is not guaranteed to be thread safe, even for
read-access.

So because these global maps are accessed by all the threads
we need to protect them.

This fixes a random crash experienced during testing.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoMovePicker::score_captures() order with SEE when pv
Marco Costalba [Mon, 27 Oct 2008 21:04:47 +0000 (22:04 +0100)]
MovePicker::score_captures() order with SEE when pv

Order PV nodes by SEE instead of MVV/LVA.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRevert "Last minute surprise" for now
Marco Costalba [Mon, 27 Oct 2008 20:59:12 +0000 (21:59 +0100)]
Revert "Last minute surprise" for now

It defenitly needs more testing. Just postponed.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFinish material.cpp cleanup
Marco Costalba [Mon, 27 Oct 2008 20:54:39 +0000 (21:54 +0100)]
Finish material.cpp cleanup

Hopefully no regression this time!

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoStart to simplify material.cpp
Marco Costalba [Mon, 27 Oct 2008 18:07:48 +0000 (19:07 +0100)]
Start to simplify material.cpp

It is posisble to simplify a lot here!

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFactor out Position::do_capture_move()
Marco Costalba [Mon, 27 Oct 2008 13:19:24 +0000 (14:19 +0100)]
Factor out Position::do_capture_move()

Start to slim line count i position.cpp

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix a bug in generate_evasions()
Marco Costalba [Mon, 27 Oct 2008 09:15:51 +0000 (10:15 +0100)]
Fix a bug in generate_evasions()

Introduced in the patch "movegen: prefer (*mlist++) to mlist[n++]"

This was nasty because due to a mismerge the repo in one PC had the bug,
but the testing one did not, so I had non reproducible results according
to which machine I used for testing.

This hopefully closes a more then one week regression that made me go crazy!

It was found by accident comparing, for other reasons, the sources of the
two PC's.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRefine "few moves" in "last minute surprise"
Marco Costalba [Mon, 27 Oct 2008 08:28:14 +0000 (09:28 +0100)]
Refine "few moves" in "last minute surprise"

It seems that "few moves" works because we extend the good
captures at the last ply of PV, so code it directly.

This version seems defenitly stronger then previous one.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoManual merge
Marco Costalba [Sun, 26 Oct 2008 20:44:58 +0000 (21:44 +0100)]
Manual merge

15 years agoSpace inflate extension() code
Marco Costalba [Sun, 26 Oct 2008 17:16:23 +0000 (18:16 +0100)]
Space inflate extension() code

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoTEST: extend when few moves available
Marco Costalba [Sun, 26 Oct 2008 13:52:37 +0000 (14:52 +0100)]
TEST: extend when few moves available

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRevert see shortcut when only one attacker
Marco Costalba [Sun, 26 Oct 2008 13:50:15 +0000 (14:50 +0100)]
Revert see shortcut when only one attacker

It does not seem to work after a little testing.

Perhaps it works on the long terms, but it is also
ugly because not correct, so revert for now.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoPrefer out of loop variables in MovePicker::score_captures()
Marco Costalba [Sun, 26 Oct 2008 12:51:12 +0000 (13:51 +0100)]
Prefer out of loop variables in MovePicker::score_captures()

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoEffectively use MVV/LVA in MovePicker::score_captures()
Marco Costalba [Sun, 26 Oct 2008 12:47:31 +0000 (13:47 +0100)]
Effectively use MVV/LVA in MovePicker::score_captures()

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoReintroduce piece/square tables to score non-captures
Marco Costalba [Sun, 26 Oct 2008 12:44:34 +0000 (13:44 +0100)]
Reintroduce piece/square tables to score non-captures

Was removed after original movepick restore. But proved
to be useful.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoPosition: fix a couple of Intel compiler warnings
Marco Costalba [Sun, 26 Oct 2008 12:23:27 +0000 (13:23 +0100)]
Position: fix a couple of Intel compiler warnings

Plus usual trailing whitespace.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoTest with SEE shortcut
Marco Costalba [Sat, 25 Oct 2008 19:44:10 +0000 (20:44 +0100)]
Test with SEE shortcut

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoBetter naming of pseudo-legality and legality testing
Marco Costalba [Sat, 25 Oct 2008 15:39:24 +0000 (16:39 +0100)]
Better naming of pseudo-legality and legality testing

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoTry to cleanup movepick
Marco Costalba [Sat, 25 Oct 2008 14:57:19 +0000 (15:57 +0100)]
Try to cleanup movepick

Hopefully without regressions.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRestore original movepick modulo space inflation
Marco Costalba [Sat, 25 Oct 2008 14:28:24 +0000 (15:28 +0100)]
Restore original movepick modulo space inflation

We have a regression somewhere here so restart from zero
and proceed one change at a time.

With this modification we have the same strenght of
"Introduce Stockfish" patch that is our strongest to date.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoSpace inflate position: complete!
Marco Costalba [Sat, 25 Oct 2008 08:06:52 +0000 (09:06 +0100)]
Space inflate position: complete!

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoSpace inflate position until do_promotion_move()
Marco Costalba [Fri, 24 Oct 2008 07:14:20 +0000 (09:14 +0200)]
Space inflate position until do_promotion_move()

We will end some day ;-)

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoStart to space inflate position.cpp
Marco Costalba [Thu, 23 Oct 2008 20:51:26 +0000 (21:51 +0100)]
Start to space inflate position.cpp

It's a big file!

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix a performance bug in generate_move_if_legal
Marco Costalba [Thu, 23 Oct 2008 20:02:10 +0000 (21:02 +0100)]
Fix a performance bug in generate_move_if_legal

Use the pinned argument in pos.move_is_legal()

No functional change, simply use pos.move_is_legal() as
was meant to be.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoUnify pinned and discovery checks code
Marco Costalba [Thu, 23 Oct 2008 19:43:48 +0000 (20:43 +0100)]
Unify pinned and discovery checks code

Templates are our friends here. No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRefactor Position::pinned_pieces() to use templates
Marco Costalba [Thu, 23 Oct 2008 10:59:20 +0000 (12:59 +0200)]
Refactor Position::pinned_pieces() to use templates

Also better document this interesting function.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agomovegen: add SERIALIZE_MOVES and hides a bunch of loops
Marco Costalba [Thu, 23 Oct 2008 08:42:14 +0000 (10:42 +0200)]
movegen: add SERIALIZE_MOVES and hides a bunch of loops

Only syntactic sugar, perhaps we should leave as is, anyhow...

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoAnother generate_piece_moves() micro optimization
Marco Costalba [Thu, 23 Oct 2008 07:47:00 +0000 (09:47 +0200)]
Another  generate_piece_moves() micro optimization

This time on the for loop.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix another template conversion bug in movegen
Marco Costalba [Thu, 23 Oct 2008 07:01:36 +0000 (08:01 +0100)]
Fix another template conversion bug in movegen

Hopefully the last one.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agomovegen: prefer (*mlist++) to mlist[n++]
Marco Costalba [Wed, 22 Oct 2008 22:18:11 +0000 (23:18 +0100)]
movegen: prefer (*mlist++) to mlist[n++]

Teoretically faster, practically it helps to
removes some more lines.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix a bug in generate_pawn_captures()
Marco Costalba [Tue, 21 Oct 2008 23:12:16 +0000 (00:12 +0100)]
Fix a bug in generate_pawn_captures()

Introduced in "movegen: Introduce generate_pawn_captures()"
when unifiying black and white functions.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFully templetize pawn move generators
Marco Costalba [Tue, 21 Oct 2008 23:06:12 +0000 (00:06 +0100)]
Fully templetize pawn move generators

A little bit more syntax heavuer but surely faster.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoMicro optimize generate_piece_moves()
Marco Costalba [Mon, 20 Oct 2008 22:10:27 +0000 (00:10 +0200)]
Micro optimize generate_piece_moves()

It is a time critical path. The biggest in move generation.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoAnother Intel warning sqeezed
Marco Costalba [Mon, 20 Oct 2008 19:57:13 +0000 (21:57 +0200)]
Another Intel warning sqeezed

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoQuiet a warning on Intel compiler
Marco Costalba [Mon, 20 Oct 2008 19:55:43 +0000 (21:55 +0200)]
Quiet a warning on Intel compiler

Plus usual trailing whitespace noise.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoShrink arguments in move generation functions
Marco Costalba [Mon, 20 Oct 2008 08:46:31 +0000 (10:46 +0200)]
Shrink arguments in move generation functions

Perhaps no speedup, but it is more readable.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix a bug in king discoveries checks
Marco Costalba [Mon, 20 Oct 2008 08:22:29 +0000 (10:22 +0200)]
Fix a bug in king discoveries checks

Introduced in "Add a generate_piece_checks() specialization for the king"

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoUpdate copyright info
Marco Costalba [Sun, 19 Oct 2008 16:56:28 +0000 (18:56 +0200)]
Update copyright info

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoLast little touches to movegen
Marco Costalba [Sun, 19 Oct 2008 16:19:16 +0000 (18:19 +0200)]
Last little touches to movegen

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRename PawnOffsets in PawnParams
Marco Costalba [Sun, 19 Oct 2008 16:01:01 +0000 (18:01 +0200)]
Rename PawnOffsets in PawnParams

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoPawn move generator: dispatch at compile time
Marco Costalba [Sun, 19 Oct 2008 15:54:18 +0000 (17:54 +0200)]
Pawn move generator: dispatch at compile time

Instead of function pointers use templates to
dispatch shift operations.

It is more clear and possibly also faster because
branches are removed at compile time.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoStart to templetize pawn move generators
Marco Costalba [Sun, 19 Oct 2008 15:20:21 +0000 (16:20 +0100)]
Start to templetize pawn move generators

Still very soft, we will see if compiler is
enough or we need more aggressive templetization.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRemove Positions::xxx_count() functions
Marco Costalba [Sun, 19 Oct 2008 13:39:29 +0000 (14:39 +0100)]
Remove Positions::xxx_count() functions

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRemove white/black_pawn_attacks_square()
Marco Costalba [Sun, 19 Oct 2008 13:06:06 +0000 (14:06 +0100)]
Remove white/black_pawn_attacks_square()

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoTempletize Position::xxx_attacks_square()
Marco Costalba [Sun, 19 Oct 2008 12:56:57 +0000 (13:56 +0100)]
Templetize Position::xxx_attacks_square()

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRemove Position::xxx_list() functions
Marco Costalba [Sun, 19 Oct 2008 12:44:25 +0000 (13:44 +0100)]
Remove Position::xxx_list() functions

No useful, only obfuscating.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoAdd a generate_piece_checks() specialization for the king
Marco Costalba [Sun, 19 Oct 2008 12:22:03 +0000 (13:22 +0100)]
Add a generate_piece_checks() specialization for the king

Also reshuffle the code a bit.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRemove white/black_pawn_attacks()
Marco Costalba [Sun, 19 Oct 2008 11:53:51 +0000 (12:53 +0100)]
Remove white/black_pawn_attacks()

Unuseful syntactic sugar, obfuscates the
real code.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoPrefer template to name decoration
Marco Costalba [Sun, 19 Oct 2008 11:43:09 +0000 (12:43 +0100)]
Prefer template to name decoration

This also allows faster code although bigger.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix a missing comma in BenchmarkPositions[]
Marco Costalba [Sun, 19 Oct 2008 10:55:53 +0000 (11:55 +0100)]
Fix a missing comma in BenchmarkPositions[]

An old bug introduced in 3e0dc9ee8477 almost
one month ago.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoPosition::is_ok()give more info on failed test
Marco Costalba [Sun, 19 Oct 2008 09:41:24 +0000 (10:41 +0100)]
Position::is_ok()give more info on failed test

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix an assert due to a missing parentesis
Marco Costalba [Sun, 19 Oct 2008 09:17:17 +0000 (10:17 +0100)]
Fix an assert due to a missing parentesis

Bitwise operators precedence issue here, was
causing an assert.

This is a fallout from recent patches.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFinal semplification of generate_evasions()
Marco Costalba [Sun, 19 Oct 2008 08:33:33 +0000 (09:33 +0100)]
Final semplification of generate_evasions()

Now it's readable!

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoIntroduce generate_piece_blocking_evasions()
Marco Costalba [Sun, 19 Oct 2008 07:49:26 +0000 (08:49 +0100)]
Introduce generate_piece_blocking_evasions()

Start to simplify generate_evasions

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoSpace inflate generate_evasions()
Marco Costalba [Sun, 19 Oct 2008 07:27:24 +0000 (08:27 +0100)]
Space inflate generate_evasions()

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoUpdate copyright info
Marco Costalba [Sun, 19 Oct 2008 16:56:28 +0000 (18:56 +0200)]
Update copyright info

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoLast little touches to movegen
Marco Costalba [Sun, 19 Oct 2008 16:19:16 +0000 (18:19 +0200)]
Last little touches to movegen

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRename PawnOffsets in PawnParams
Marco Costalba [Sun, 19 Oct 2008 16:01:01 +0000 (18:01 +0200)]
Rename PawnOffsets in PawnParams

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoPawn move generator: dispatch at compile time
Marco Costalba [Sun, 19 Oct 2008 15:54:18 +0000 (17:54 +0200)]
Pawn move generator: dispatch at compile time

Instead of function pointers use templates to
dispatch shift operations.

It is more clear and possibly also faster because
branches are removed at compile time.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoStart to templetize pawn move generators
Marco Costalba [Sun, 19 Oct 2008 15:20:21 +0000 (16:20 +0100)]
Start to templetize pawn move generators

Still very soft, we will see if compiler is
enough or we need more aggressive templetization.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRemove Positions::xxx_count() functions
Marco Costalba [Sun, 19 Oct 2008 13:39:29 +0000 (14:39 +0100)]
Remove Positions::xxx_count() functions

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRemove white/black_pawn_attacks_square()
Marco Costalba [Sun, 19 Oct 2008 13:06:06 +0000 (14:06 +0100)]
Remove white/black_pawn_attacks_square()

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoTempletize Position::xxx_attacks_square()
Marco Costalba [Sun, 19 Oct 2008 12:56:57 +0000 (13:56 +0100)]
Templetize Position::xxx_attacks_square()

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRemove Position::xxx_list() functions
Marco Costalba [Sun, 19 Oct 2008 12:44:25 +0000 (13:44 +0100)]
Remove Position::xxx_list() functions

No useful, only obfuscating.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoAdd a generate_piece_checks() specialization for the king
Marco Costalba [Sun, 19 Oct 2008 12:22:03 +0000 (13:22 +0100)]
Add a generate_piece_checks() specialization for the king

Also reshuffle the code a bit.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoRemove white/black_pawn_attacks()
Marco Costalba [Sun, 19 Oct 2008 11:53:51 +0000 (12:53 +0100)]
Remove white/black_pawn_attacks()

Unuseful syntactic sugar, obfuscates the
real code.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoPrefer template to name decoration
Marco Costalba [Sun, 19 Oct 2008 11:43:09 +0000 (12:43 +0100)]
Prefer template to name decoration

This also allows faster code although bigger.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
15 years agoFix a missing comma in BenchmarkPositions[]
Marco Costalba [Sun, 19 Oct 2008 10:55:53 +0000 (11:55 +0100)]
Fix a missing comma in BenchmarkPositions[]

An old bug introduced in 3e0dc9ee8477 almost
one month ago.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>