General Question

LostInParadise's avatar

How do chess playing computers evaluate a position?

Asked by LostInParadise (32163points) March 20th, 2019

What I have read is that the latest generation of AI programs learn how to win at chess, or any other game, simply by knowing the rules and playing millions of games against itself. No general strategies are given to the computer. There has to be more to it.

I have done Web searches on this and have not found an answer. All I found were ways of minimizing the amount of look-ahead, assuming some way of evaluating each position. But how are positions evaluated?

Observing members: 0 Composing members: 0

15 Answers

ragingloli's avatar

During training, they build their own database of what move resulted in a loss/win in each given position.
Essentially, they have experience.

elbanditoroso's avatar

As I understand it, it a bit more than what you wrote. That’s part of it, but not all.

The computer does play games with itself, but it also looks at historical (actual) games between chess masters. It looks at placement of all pieces on the board (what is 64 factorial? – that’s how many possibilities there are), and then calculates, based on board position, the most likely outcomes of any given move.

And it does this blazingly fast.

Essentially, it looks at not only its own history of self-=played games, but also previously played historical games, and refers to those for calculating probabilities.

ragingloli's avatar

@elbanditoroso
If you are talking about AlphaZero and LeelaZero, then no, they have no human games in their dataset at all.
There is a reason for the “Zero” in their names.

LostInParadise's avatar

@ragingloli , There must be some generalized evaluation function. Suppose, for example, each piece is initially given equal value. Then maybe that value can be updated by looking at what is around in a winning game.

ragingloli's avatar

I think the Zeros’ goal is always a checkmate. Any value given to pieces are derived from their usefulness in achieving that goal (the Zeros are only given the rules, that means no predetermined piece values). So I would imagine the AI evaluates the probability of a checkmate.

flutherother's avatar

How does an artificial intelligence recognise a dog? The systems that do this most effectively aren’t told anything that you might expect eg look for four legs and a tail. They are just fed billions of images and told whether their guesses are good or not.

The raw data is just pixels, the output is simply dog or not dog the secret is in the neural network that processes the data and modifies itself.

Alpha zero doesn’t assess game positions like we do and exactly why neural networks are generally so effective doesn’t seem fully understood.

Pinguidchance's avatar

Iteratively. Pawn to king 4.

ARE_you_kidding_me's avatar

They use reinforcement learning algorithms.

LostInParadise's avatar

Reinforcement of what? The chances of the same position appearing in another game is infinitesimal.

Response moderated (Spam)
Response moderated
ragingloli's avatar

They are playing millions upon millions of games.
If you discard all the illegal moves, and moves that lead almost immediately to bad results, I think it becomes manageable.

ragingloli's avatar

Here is a presentation by one of the creators of AlphaZero.
https://www.youtube.com/watch?v=3N9phq_yZP0

Response moderated (Spam)
Response moderated (Spam)

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther