My questions involves the optimization of move legality testing after doing a make in the alpha-beta search.
A major chunk of the time spent by my chess engine is doing this.
It uses the typical isInCheck method of taking the king's index and looking for knight,rook, etc. moves from there.
I have optimized this routine about all that I can.
I also have a check-evasion move generator, so I am here referring to the case where we are NOT in check already.
Also, let's forget about king moves for the moment.
Intuitively, it seems wasteful to be doing so much verification just to catch the cases where you are moving an
absolutely pinned ( pinned against the king ) piece.
I know that some engines allow the king to be captured, but that sounds like too massive of a re-architecture
for a mature engine. ( Would need to be planned at the start, right)
Any thoughts are appreciated. Thanks in advance.