0ff41c408b
add repetition detection, root position count
...
- hist.c: add hist_next() - get next entry in history
- state_t: remove plycount, clock_50 -> ply50, add phase, repcount
- pos_t: add plycount, plyroot
- state_t moved to chessdefs.h
- perft-test: split perft from do_perft (todo for perft_alt)
- position.c: add pos_repcount()
- search.c: add is_draw()
- uci: set root position (after moves), adjust history moves repcount
2024-08-04 09:37:58 +02:00
99658316fb
move all uci to uci.c, eval variables to eval-defs.c
2024-07-22 21:07:46 +02:00
98c54553d0
Combo changes
...
- move eval_material to eval-simple.c
- move phase_t to eval.h
- init.c: add eval init
- piece.h: add piece_midval/piece_endval
- fen.c: add phase calculation
- eval-simple: fix calc_phase
2024-07-22 18:56:54 +02:00
5401e83db8
Memory allocation: moved to alloc.[ch]
2024-07-10 07:49:44 +02:00
91abc3e26d
convert piece_t, square_t etc. to u8 (no more typed enum. See C23 ?).
2024-07-03 08:49:54 +02:00
3a6c1d11c0
rename util.h -> misc.h (2)
2024-06-23 19:22:22 +02:00
ec64e2e44d
replace pawn_shift_xxx with bb_pawns_attacks
2024-05-28 09:40:20 +02:00
972046351b
fen: simplify fen_check() + fix e.p. when no possible capture
2024-05-27 14:54:44 +02:00
2069d6073d
add pos_copy(); pos->king[] set at higher level
2024-05-16 07:16:17 +02:00
5db45a760a
fen: calc pos hash, hash: fix zobrist_init, add zobrist_verify
2024-05-15 18:36:30 +02:00
32ade1777f
ren macros mask->BIT/C64->U64, del pinners/checkers/blockers in state_s
2024-05-06 07:41:27 +02:00
09afd98971
fen2pos: no more pos_checkers etc... position.c: pos_check -> pos_ok (bool)
2024-03-27 12:40:16 +01:00
49705bc707
rename few macros to lowercase, add M_DPUSH move flag
2024-03-19 18:30:10 +01:00
0f06ccb8db
simplify piece_details structure/functions (need to rewrite)
2024-03-15 09:08:49 +01:00
cc3754ae00
add position blockers
2024-03-12 10:44:25 +01:00
87e7695873
new pos/bb funcs, legal(), better castling gen, etc. [see commit details]
...
- new sq_pinners
- new pseudo_is_legal() (unfinished)
- improve castling pseudo move gen
- more position and lower level bitboard helper funcs:
- pos_{_occ,between_occ,between_count,pinners}
- bb_{rank,file,rel_rank,_sq_aligned,_sq_between)
- rename some bitboard globals
- replace bb ranks/files enums with defines (issue with clang)
-> Need to find a way to use enum safely
- tests:
- add common-test.h
- new attack-test.c
2024-03-10 10:58:14 +01:00
b351d198b8
sq_attackers() + others (see dedails). Ready for move do/undo ?
...
- add many "const" in func parameters
- attack.c: sq_attackers()
- move print_board_raw from position.c to to board.c
- move some fen_check() tests to pos_check()
- add REL_RANK() macro. TODO: add one more for bitboards
- fen.c: more tests for FEN validity
- position.c: add pos_checkers() and pos_check()
- tests: add common-test.h (for shared FEN positions access)
2024-03-04 21:34:29 +01:00
be32bae86a
strengthen FEN parsing
2024-02-29 09:31:40 +01:00
9c02a02c1e
fen: add fen_test()
2024-02-22 09:11:25 +01:00
568b39e366
add movegen draft, add king square in pos_t, BRQKN move gen (untested)
2024-02-20 21:00:45 +01:00
d5906b1fb9
start bitboard init (see commit details)
...
- bitboard.c: make attacks for knight/king
- square macros (BB, BBfile, BBrank) renamed sq_make, sq_file,
sq_rank, moved to board.h (and become temporarily inline funcs)
- different macros/defs moved to "correct place" (bitboard/board/piece):
board.[ch]: everything related to board/square
bitboard.[ch]: everything related to bitboards
piece.[ch]: everything related to pieces
2024-02-11 20:47:09 +01:00
4f25c1416d
re-organize defines / few bug fix
2024-02-10 09:16:59 +01:00
d6f2497bb0
rename typedefs - temp commit for computer change
2024-02-08 09:50:14 +01:00
1929d4bb1f
bb migration: add util, update fen/fen-test + partial pos + piece
2024-02-07 22:08:24 +01:00
a8565e46cd
Set back fen.c file
2024-02-05 08:38:10 +01:00
c7a2d9b330
Copy fen.c into temp-migration-bitboard/fen.c
2024-02-05 08:38:10 +01:00
01c5765888
remove -DBIN_xxx from brchess source files. parts moved to ./test (TODO)
2023-12-13 21:30:39 +01:00
48319cf21a
add M_PR_NL option in move_print()
2023-07-09 15:53:57 +02:00
aa7cb11056
add FILE* output
2023-07-02 11:36:04 +02:00
1154f141c9
start bitboard integration
2023-06-22 16:08:57 +02:00
05a64ec742
simplify 0x88 macros / remove redundant chessdefs.h equivalent ones
2021-11-20 16:15:45 +01:00
f0e1836f2f
add memstats / clear lists when new fen position
2021-11-14 16:03:36 +01:00
bd7d9f8551
add memory pool for positions
2021-11-12 18:33:39 +01:00
4365838276
simplify bitboard macros & move_gen use bitboard for occupied square
2021-11-12 12:28:44 +01:00
7c98f0d4c5
piece_t change, pack piece_details, conversion piece: mask<=>number
2021-11-10 15:54:13 +01:00
d38e2f4543
Occupancy & square control bitboards + continue printf->logX
2021-11-08 08:38:38 +01:00
c7faa88bfa
structures forward declarations
2021-11-04 13:06:24 +01:00
0e117bc2f9
move from printf to logX() - unfinished.
2021-11-03 12:39:23 +01:00
06548a6464
Add flags for move display. Fix move generator color + pawn capture
2021-11-01 09:37:40 +01:00
3ac41d7f78
Add pawn pseudo-moves
2021-10-31 19:57:14 +01:00
07e7cbc72a
fen.c: bug fix wrong empty square loop in fen parsing
2021-10-31 08:30:53 +01:00
4bba067cd6
Add player's pieces list management + change board def.
2021-10-30 22:03:17 +02:00
7bdc428485
add license information & rename typedefs
2021-10-29 09:00:10 +02:00
264459dc0f
initial files
2021-10-27 16:09:56 +02:00