022daf0a89
typedef key -> #define key_t - can't use typedef, due to <sys/types.h>
2024-05-15 09:42:33 +02:00
32ade1777f
ren macros mask->BIT/C64->U64, del pinners/checkers/blockers in state_s
2024-05-06 07:41:27 +02:00
f0acdb6a66
pos_ok(): always set BUG_ON and WARN_ON
2024-04-16 12:32:37 +02:00
4816b4a53a
experiment: add pos_set_checkers_pinners_blockers()
2024-03-30 18:45:13 +01:00
09afd98971
fen2pos: no more pos_checkers etc... position.c: pos_check -> pos_ok (bool)
2024-03-27 12:40:16 +01:00
70d6c23c00
position add: pos_set_pinners_blockers()
2024-03-26 17:31:44 +01:00
aaeab03089
revert captured in position before change to move struct
2024-03-23 19:49:35 +01:00
ce2e0e8459
add forgotten changes in bitboard-switch branch (git is so... difficult)
2024-03-23 17:41:15 +01:00
51a348c1e4
add pos_cmp (as a debug check after move_{do,undo})
2024-03-21 06:58:56 +01:00
ae6328ce26
position: add captured piece
2024-03-20 09:57:10 +01:00
dc916f5c56
move.h: revert flags to direct bit mask
2024-03-18 09:15:16 +01:00
9c2e76442d
add a struct_group for move_do() irreversible changes
2024-03-17 17:34:21 +01:00
cc3754ae00
add position blockers
2024-03-12 10:44:25 +01:00
6ee4cd1642
cleanup
2024-03-11 16:12:45 +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
a499893f32
add board_print, board_print_mask
2024-03-02 07:10:23 +01:00
8f0840fc2f
add functions documentation - should be done earlier !!
2024-02-29 09:31:00 +01:00
fa5c9bb8ab
bitboard8_sprint -> bitboard_rank_sprint (temp, need BB+rank as input)
2024-02-22 09:29:10 +01:00
4d8f69e8c9
position: raw_board_print in octal, fix mask in pos_set_sq/pos_clr_sq
2024-02-22 08:35:26 +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
13bbf45fc5
Set back position.h file
2024-02-05 08:38:11 +01:00
e2ec09ba65
Copy position.h into temp-migration-bitboard/position.h
2024-02-05 08:38:11 +01:00
1aa419392e
adapt to brlib 0.3
2024-01-06 19:54:22 +01:00
48b5420830
Add check array in position structure
2023-07-25 06:54:33 +02:00
ed9b9cc646
add nodes_count and moves_{generated,counted} in pos struct
2023-07-11 22:22:33 +02:00
0df87ff41c
Add bestmove in pos struct, add pos_check()
2023-07-09 15:36:14 +02:00
120a459206
add pos_del function
2023-07-07 15:53:57 +02:00
183e9ef2be
Improve move gen, delete ling pos, 3 steps moves generation
2023-07-07 02:21:14 +02:00
09ceca44e5
pos: keep possibility to have opponent moves (NULL move)
2023-06-25 16:02:23 +02:00
1154f141c9
start bitboard integration
2023-06-22 16:08:57 +02:00
f0e1836f2f
add memstats / clear lists when new fen position
2021-11-14 16:03:36 +01:00
5bf5d6bae9
bodichess main loop (move gen/eval/fen init/print pos/print moves)
2021-11-14 11:35:03 +01:00
451afea6b5
refactor position: now contains board (not board *)
2021-11-12 20:22:20 +01:00
bd7d9f8551
add memory pool for positions
2021-11-12 18:33:39 +01:00
bd88da013c
pos: added mobility. move_gen: hangle castling
2021-11-12 11:00:59 +01:00
5623dc78a5
dummy eval func (pieces + square control), bit ops, shorter int types
2021-11-09 20:57:18 +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
16c0c06095
remove piece2char/piece2string (global var instead)
2021-10-31 13:44:08 +01:00
2f701c4bd5
pseudo-moves for pieces (not pawns nor special moves)
2021-10-31 12:16:11 +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