How Does the chess algorithm know-Castling

Sort:
aflfooty

Lol..that was hilarious llamonade 2..😊😊😊.. I've been to the top of the Burj Al Arab many times but not the Khalifa yet. 

I was thinking whether I would see Roger Federer or tiger hit off rather than ginger bread architecture though👍 

llamonade2

Just sayin' bruh.

Computers are exceptionally stupid, but as long as you explain things to them in exhaustive terms, they can manage to not totally screw it up.

Honestly if you took a beginner level programming course (online or otherwise) you'd see something like castling it's pretty simple.

aflfooty

👍👍

Laskersnephew

I would bet that no computer programmer ever worried about the castling problem. If you know enough to program a computer, you already know how to handle it.

Galaxy_Chess_God
aflfooty wrote:

One of the mysteries of life. 

If you are in the castling position. Then you move your king instead. 

Say you move it 3 times. 

Then, finally you move your king back to its original position. 

How does the chess gods remember you moved your king and can't castle. 

 

yes we do

Although it is very hard to keep up with 10,000s of games at the same time that is why i have helpers

Sred
Laskersnephew wrote:

I would bet that no computer programmer ever worried about the castling problem. If you know enough to program a computer, you already know how to handle it.

As a software developer, I can confirm that it is entirely trivial.

autobunny
aflfooty wrote:

One of the mysteries of life. 

If you are in the castling position. Then you move your king instead. 

Say you move it 3 times. 

Then, finally you move your king back to its original position. 

How does the chess gods remember you moved your king and can't castle. 

Conceptually 6 boolean flags for kings and rooks.  Just like humans keeping state.