1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00
BadFish/src
Marco Costalba 297c12e595 Simplify endgame functions handling
We really don't need to have global endgame functions. We can
allocate them on the heap at initialization time and store the
corresponding pointer directly in the functions maps. To avoid
leaks we just need to remember to deallocate them in map d'tor.

These functions are always created in couple, one for each color,
so remove a lot of redundant hard coded info and just use the minimum
required: the type and the corresponding named string.

This greatly simplifies the code and also it is less error prone,
now is much simpler to add a new endgame specialized function: just
add the corresponding enum in endgame.h and the obvious add_xx()
call in EndgameFunctions c'tor, and of course, the most important part,
the EvaluationFunction<xxx>::apply() specialization in endgame.cpp

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-07-17 07:55:51 +01:00
..
application.cpp Update copyright year 2009-05-07 14:54:40 +02:00
application.h Update copyright year 2009-05-07 14:54:40 +02:00
benchmark.cpp Add support for saving timing file during benchmark 2009-07-04 10:32:51 +01:00
benchmark.h Update copyright year 2009-05-07 14:54:40 +02:00
bitbase.cpp Update copyright year 2009-05-07 14:54:40 +02:00
bitbase.h Update copyright year 2009-05-07 14:54:40 +02:00
bitboard.cpp Restore correct 64 bit version of pop_1st_bit() 2009-07-03 10:18:20 +02:00
bitboard.h Restore correct 64 bit version of pop_1st_bit() 2009-07-03 10:18:20 +02:00
bitcount.h Fix bitcount.h compile warnings under Intel compiler 2009-07-04 18:10:39 +01:00
book.cpp Update copyright year 2009-05-07 14:54:40 +02:00
book.h Update copyright year 2009-05-07 14:54:40 +02:00
color.h Use string instead of std::string 2009-05-10 18:38:47 +01:00
COPYING Initial import of Glaurung 2.1 2008-09-01 07:59:13 +02:00
depth.h Directly relate HistoryMax to OnePly 2009-05-20 14:43:17 +02:00
direction.cpp Space inflate and cleanup direction.cpp 2009-05-20 12:02:39 +02:00
direction.h Update copyright year 2009-05-07 14:54:40 +02:00
endgame.cpp Simplify endgame functions handling 2009-07-17 07:55:51 +01:00
endgame.h Simplify endgame functions handling 2009-07-17 07:55:51 +01:00
evaluate.cpp Joona tweaks of Weights and limits 2009-07-12 08:37:28 +01:00
evaluate.h Small code style in headers 2009-05-20 15:11:41 +02:00
history.cpp Reduce history 4 times instead of 2 when reach the maximum 2009-05-20 09:03:15 +02:00
history.h Directly relate HistoryMax to OnePly 2009-05-20 14:43:17 +02:00
lock.h Small code style in headers 2009-05-20 15:11:41 +02:00
main.cpp Add support for saving timing file during benchmark 2009-07-04 10:32:51 +01:00
Makefile Small Makefile tweaks 2009-07-04 21:56:59 +01:00
material.cpp Simplify endgame functions handling 2009-07-17 07:55:51 +01:00
material.h Fix a couple of warnings under Intel compiler 2009-06-20 14:45:03 +01:00
mersenne.cpp Warnings termination fest 2008-09-24 00:32:53 +02:00
mersenne.h Update copyright year 2009-05-07 14:54:40 +02:00
misc.cpp Restore development versioning and LSN filtering 2009-07-06 11:20:05 +01:00
misc.h Use string instead of std::string 2009-05-10 18:38:47 +01:00
move.cpp Micro optimize and rename move_promotion() 2009-06-20 09:04:32 +01:00
move.h Micro optimize and rename move_promotion() 2009-06-20 09:04:32 +01:00
movegen.cpp Introduce SERIALIZE_MOVES_D() macro and use it for pawn moves 2009-07-14 10:28:41 +01:00
movegen.h Update copyright year 2009-05-07 14:54:40 +02:00
movepick.cpp Introduce see_sign() and use it to shortcut full see() 2009-07-12 08:37:43 +01:00
movepick.h MovePicker doesn't need to know if called from a pv node 2009-06-12 13:10:02 +02:00
pawns.cpp Microptimize pawns info access 2009-07-03 13:11:32 +01:00
pawns.h Fix a couple of warnings under Intel compiler 2009-06-20 14:45:03 +01:00
piece.cpp Update copyright year 2009-05-07 14:54:40 +02:00
piece.h Update copyright year 2009-05-07 14:54:40 +02:00
position.cpp Introduce see_sign() and use it to shortcut full see() 2009-07-12 08:37:43 +01:00
position.h Introduce see_sign() and use it to shortcut full see() 2009-07-12 08:37:43 +01:00
psqtab.h Joona tweaks of piece values 2009-07-02 06:29:14 +01:00
san.cpp Micro optimize and rename move_promotion() 2009-06-20 09:04:32 +01:00
san.h Update copyright year 2009-05-07 14:54:40 +02:00
scale.h Update copyright year 2009-05-07 14:54:40 +02:00
search.cpp Renamed the variable 'looseOnTime' to 'loseOnTime', because I'm a pedant. 2009-07-15 11:01:49 +02:00
search.h Remove global variables from search.h 2009-06-12 13:10:40 +02:00
square.h Update copyright year 2009-05-07 14:54:40 +02:00
thread.h Revert per-thread history tables 2009-07-02 06:29:25 +01:00
tt.cpp Update copyright year 2009-05-07 14:54:40 +02:00
tt.h Reduce SMP contention on TT 2009-06-13 11:13:09 +01:00
types.h Disable POPCNT support per default 2009-07-04 09:20:28 +01:00
uci.cpp Small tidy up of previous patch 2009-07-10 18:50:43 +01:00
uci.h Update copyright year 2009-05-07 14:54:40 +02:00
ucioption.cpp Remove "Last seconds noise" filtering UCI option 2009-07-15 08:35:00 +01:00
ucioption.h Use string instead of std::string 2009-05-10 18:38:47 +01:00
value.cpp Update copyright year 2009-05-07 14:54:40 +02:00
value.h Revert last tweaks 2009-07-09 16:45:39 +01:00