- Blind mode tutorial
lichess.org
Donate

Could an AI figure out the rules of chess from games?

If an AI was only given 1,000,000 PGNs of random chess games, shown no pieces, board, no rules or other info, would it be able to figure out the rules of the game?

If an AI was only given 1,000,000 PGNs of random chess games, shown no pieces, board, no rules or other info, would it be able to figure out the rules of the game?

You dont need AI to do. Relatively simple algorithm could do it. Obviously neural net with supervised learning would learn it far less than a million games. With that amount games it could learn somehow emulate human play.

You dont need AI to do. Relatively simple algorithm could do it. Obviously neural net with supervised learning would learn it far less than a million games. With that amount games it could learn somehow emulate human play.
<Comment deleted by user>

I'd say no, unless you give it more hints "it is a 2 dimensional board game" or "starting position is fixed." There are too many combinations to choose from.

Also, SAN might be very hard for AI to read. Better format is UCI.

I'd say no, unless you give it more hints "it is a 2 dimensional board game" or "starting position is fixed." There are too many combinations to choose from. Also, SAN might be very hard for AI to read. Better format is UCI.

@petri999 said in #2:

You dont need AI to do. Relatively simple algorithm could do it.

Certainly it would not be difficult to code the rules of chess manually, but the question was could an AI learn the rules.

Obviously neural net with supervised learning would learn it far less than a million games.

That's not obvious at all. In fact, it seems like it would be extremely difficult for an AI to learn. A benchmark would be to imagine if a human who had never seen chess before could learn the rules just by looking at a million games. It seems like it might be possible, though it would not be easy, especially the rules that are more rarely encountered, such as underpromotion. Indeed, it is possible that none of the million games contain a promotion to a bishop, for example, so it would be impossible to determine if such a promotion is allowed. The AI (or human) might assume that it is if other underpromotions are demonstrated in the games, though.

With that amount games it could learn somehow emulate human play.

If you give it the rules beforehand, perhaps. But maybe you misunderstood the question. The question was not "could an AI learn to play chess decently given the rules and a million games," but rather "could an AI learn the rules of chess from scratch, given only a million games." (PGN was specified, though as @lazzaknight mentions, this would not be a very good choice for an AI.)

@petri999 said in #2: > You dont need AI to do. Relatively simple algorithm could do it. Certainly it would not be difficult to code the rules of chess manually, but the question was could an AI learn the rules. > Obviously neural net with supervised learning would learn it far less than a million games. That's not obvious at all. In fact, it seems like it would be extremely difficult for an AI to learn. A benchmark would be to imagine if a human who had never seen chess before could learn the rules just by looking at a million games. It seems like it might be possible, though it would not be easy, especially the rules that are more rarely encountered, such as underpromotion. Indeed, it is possible that none of the million games contain a promotion to a bishop, for example, so it would be impossible to determine if such a promotion is allowed. The AI (or human) might assume that it is if other underpromotions are demonstrated in the games, though. > With that amount games it could learn somehow emulate human play. If you give it the rules beforehand, perhaps. But maybe you misunderstood the question. The question was not "could an AI learn to play chess decently given the rules and a million games," but rather "could an AI learn the rules of chess from scratch, given only a million games." (PGN was specified, though as @lazzaknight mentions, this would not be a very good choice for an AI.)

I think it could only learn the rules as much as we can learn the atomic forces, how nature works - but it would find it in its own way of viewing the game - for example it would still need some more training to find out if the thing it wants to play is possible in the game, is it allowed.

Or in other words - it would for example still NEED to assume that the rules of the game are universal on every level, it could observe that you can only castle once but it would never know that you cannot castle twice - the games only show what happened not what can only happen (still there are many games that havent been played, moves that werent played in all possible positions on the board). Recently there was some YT video that was searching for the least popular move and i think it was the double annotated discovered bishop checkmate , there were three same colour bishops on the board ( youtube is GAFAM consortium, be aware)

In nature science we assume that there exists a method for the world, that physics laws are universal across whole universe and we are searching for laws like that and world allows us to find such laws :)

I think it could only learn the rules as much as we can learn the atomic forces, how nature works - but it would find it in its own way of viewing the game - for example it would still need some more training to find out if the thing it wants to play is possible in the game, is it allowed. Or in other words - it would for example still NEED to assume that the rules of the game are universal on every level, it could observe that you can only castle once but it would never know that you cannot castle twice - the games only show what happened not what can only happen (still there are many games that havent been played, moves that werent played in all possible positions on the board). Recently there was some YT video that was searching for the least popular move and i think it was the double annotated discovered bishop checkmate , there were three same colour bishops on the board ( youtube is GAFAM consortium, be aware) In nature science we assume that there exists a method for the world, that physics laws are universal across whole universe and we are searching for laws like that and world allows us to find such laws :)

What does "figure out" even mean in the context of AI? Are you talking about the real AIs that don't exist yet, or the things people are calling AI today?

What does "figure out" even mean in the context of AI? Are you talking about the real AIs that don't exist yet, or the things people are calling AI today?

@mcgoves said in #7:

What does "figure out" even mean in the context of AI? Are you talking about the real AIs that don't exist yet, or the things people are calling AI today?

I believe OP is asking if a machine learning model could be trained to recognize and/or produce legal moves in a chess position, given just games and no rules.

@mcgoves said in #7: > What does "figure out" even mean in the context of AI? Are you talking about the real AIs that don't exist yet, or the things people are calling AI today? I believe OP is asking if a machine learning model could be trained to recognize and/or produce legal moves in a chess position, given just games and no rules.

Some rules takes a lot of games to clarify because they aren't that common. En passant and pawn promotion and various draws.

I think you need quite a lot of games.

Some rules takes a lot of games to clarify because they aren't that common. En passant and pawn promotion and various draws. I think you need quite a lot of games.

The problem I see there is that the games could be similar or just not demonstrate the full set of rules of the game, in which case AI would obviously fail (unless it will try to guess or just do what it knows).

The problem I see there is that the games could be similar or just not demonstrate the full set of rules of the game, in which case AI would obviously fail (unless it will try to guess or just do what it knows).

This topic has been archived and can no longer be replied to.