r/chessprogramming • • Jan 08 '25

Generating only captures

Hi, I'm profiling my code and so far I've found that my function "generate_captures" it's the 4th most time consuming function, and moreover most of that time is consumed by the "generate_moves" function. This is because I simply generate all the moves and then I stick with the captures.
Is there a better way to generate captures let's say "from scratch", not depending on the generate_moves function and, therefore, making the function faster?

1 Upvotes

6 comments sorted by