Hacker News new | past | comments | ask | show | jobs | submit login

Speaking of rules : I noticed the AI was able to castle even though one of the square in the path was attacked by one of my piece. I'm not a chess expert at all (this AI seems much better than me ^^) but I thought it shouldn't be possible.



I wouldn't be surprised if it doesn't cover that, I can imagine it'd be tricky to include without adding tens of bytes (10-20 bytes could be freed up by using slightly hackier function calls to/from the display, so perhaps Óscar will add more features/intelligence one day)


Was it a long castle? In that case, the squares the rook moves through don't block the move, it's only the squares the king moves through that block the castling move, so f8 and g8 for short castle and d8 and c8 for long castle.


Ah! It might have been that situation indeed, but I don't remember which square was attacked exactly. Good to know :)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: