Is learning the moves a special case or just the same sort of thing that happens as the AI learns strategy? If you take two different neural networks and teach them each how the pieces move, what checkmate is, etc. will the two networks look identical or is there a random element that means that two networks with the exact same number of nodes, running on the same processors, etc. will not look identical even though they both know exactly the same things?

  • $\begingroup$ Perhaps part of your confusion: you generally don't teach the neural networks how the pieces move and what checkmate is. You just teach them directly how to suggest good moves, and an external program is used to ignore illegal move suggestions and pick the best legal move from the net's suggestions. $\endgroup$ May 14, 2022 at 21:02

1 Answer 1


How does learning the moves of chess show up in a neural network?

If you have 2 neural networks that have been initialised in the same way, are trained with the exact same sequence of samples, and there is no other source of randomness, then they will be identical at the end of training.

So, the answer to your question is: it depends on the learning algorithm, how you initialise the neural networks, and how you sample the data and feed it to the neural network. There's no magic!

Finally, what they learn is encoded in their weights and how these weights are used to produce the output (i.e. the architecture). It's not easy to explain intuitively what the neural networks are exactly doing to produce the output (so they are sometimes called black box models), but there are explainable AI techniques that can be used for this purpose.

  • $\begingroup$ would it be possible to look at the network and identify, e.g., this is where the knight move is encoded? how long before the way the knight moves is stored accurately? $\endgroup$
    – releseabe
    May 14, 2022 at 15:16
  • $\begingroup$ That sort of question is an open area of research in general, though as @nbro mentioned there are techniques for generating explanations (with varying degrees of accuracy), along with alternative interpretable models that may or may not have the same power as blackbox models. $\endgroup$
    – bob
    May 14, 2022 at 19:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .