Giraffe, new release (Aug 17)

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: Giraffe, new release (Aug 17)

Post by matthewlai »

Werewolf wrote:
matthewlai wrote:
Thanks!

The evaluation function itself IS a neural net :). That's the special thing about Giraffe. There were a few previous engines that used neural nets either to tune evaluation functions or combine evaluation terms together, but I believe Giraffe is the first engine that uses a neural net all the way, with almost all knowledge being self-learned. I want to see what it can come up with when it's not constrained by human creativity and how humans think about chess. That seems to have worked out quite well. It has learned a very powerful evaluation function all on its own.
Matthew, this is amazing. It's really excellent that you're doing something new like this. I was under the impression that a neural net had to use lots of computers to function, but I must be wrong, since you've done it in software.

My only concern with all this is - like other posters - even if you get the best evaluation function in the world, if the search is poor there will be a limit on how strong Giraffe is.

Or do you just want to see how high it can go with the search as it is but a better and better evaluation function..?

By the way, when do you graduate?

Keep going!
Yeah Giraffe has a highly optimized implementation of neural nets, and I am still optimizing it all the time.

The first release of Giraffe searched at about 22knps, and this release searches at about 100knps. My development version is already at about 250knps. So while it's definitely not a speed demon, I think it's now getting into a position that is somewhat competitive with engines using much simpler evaluation functions.

The search is poor right now not really because of the slow eval, but just because I haven't optimized it, yet. And also, I am playing with using neural nets to enable highly selective searches, which is why I haven't implemented most of the conventional pruning techniques.

I'll be submitting the thesis in less than a month and hopefully graduating then! However, I have become so attached to Giraffe that I will probably continue working on it afterwards.

And thanks!
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
Henk
Posts: 7252
Joined: Mon May 27, 2013 10:31 am

Re: Giraffe, new release (Aug 17)

Post by Henk »

So is your solution or method game independent or did you use any chess knowledge (except rules of the game of course) ? If it is game independent how long will it take to build for instance a draughts or poker engine.
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: Giraffe, new release (Aug 17)

Post by matthewlai »

Henk wrote:So is your solution or method game independent or did you use any chess knowledge (except rules of the game of course) ? If it is game independent how long will it take to build for instance a draughts or poker engine.
It is somewhat game dependent, because the design of input representation to the neural net is game dependent.

However, the dependency is only on a very low level. I can probably convert it to play draughts in a week or so, and it would take another day or 2 of self-play to learn a good evaluation function for draughts. Poker would be a bit harder because it's not a board game.

There is some research into making truly game-independent neural nets - https://www.newscientist.com/article/dn ... deo-games/

But they obviously won't perform as well as a game-dependent one at specific games.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
Henk
Posts: 7252
Joined: Mon May 27, 2013 10:31 am

Re: Giraffe, new release (Aug 17)

Post by Henk »

matthewlai wrote:
Henk wrote:So is your solution or method game independent or did you use any chess knowledge (except rules of the game of course) ? If it is game independent how long will it take to build for instance a draughts or poker engine.
It is somewhat game dependent, because the design of input representation to the neural net is game dependent.

However, the dependency is only on a very low level. I can probably convert it to play draughts in a week or so, and it would take another day or 2 of self-play to learn a good evaluation function for draughts. Poker would be a bit harder because it's not a board game.

There is some research into making truly game-independent neural nets - https://www.newscientist.com/article/dn ... deo-games/

But they obviously won't perform as well as a game-dependent one at specific games.
So what is the input representation you use. Isn't it just an input value for each square with input value equal to (normalized) piece value or zero if square is empty.
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: Giraffe, new release (Aug 17)

Post by matthewlai »

Henk wrote:
matthewlai wrote:
Henk wrote:So is your solution or method game independent or did you use any chess knowledge (except rules of the game of course) ? If it is game independent how long will it take to build for instance a draughts or poker engine.
It is somewhat game dependent, because the design of input representation to the neural net is game dependent.

However, the dependency is only on a very low level. I can probably convert it to play draughts in a week or so, and it would take another day or 2 of self-play to learn a good evaluation function for draughts. Poker would be a bit harder because it's not a board game.

There is some research into making truly game-independent neural nets - https://www.newscientist.com/article/dn ... deo-games/

But they obviously won't perform as well as a game-dependent one at specific games.
So what is the input representation you use. Isn't it just an input value for each square with input value equal to (normalized) piece value or zero if square is empty.
No. That would be a very bad input representation because it would hinder network generalization. Positions that are close together in input space should have similar eval.

I am using mostly piece lists (coordinates of each piece).

The input representation is very carefully designed. 80% of machine learning is about feature representation.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
Henk
Posts: 7252
Joined: Mon May 27, 2013 10:31 am

Re: Giraffe, new release (Aug 17)

Post by Henk »

matthewlai wrote:
Henk wrote:
matthewlai wrote:
Henk wrote:So is your solution or method game independent or did you use any chess knowledge (except rules of the game of course) ? If it is game independent how long will it take to build for instance a draughts or poker engine.
It is somewhat game dependent, because the design of input representation to the neural net is game dependent.

However, the dependency is only on a very low level. I can probably convert it to play draughts in a week or so, and it would take another day or 2 of self-play to learn a good evaluation function for draughts. Poker would be a bit harder because it's not a board game.

There is some research into making truly game-independent neural nets - https://www.newscientist.com/article/dn ... deo-games/

But they obviously won't perform as well as a game-dependent one at specific games.
So what is the input representation you use. Isn't it just an input value for each square with input value equal to (normalized) piece value or zero if square is empty.
No. That would be a very bad input representation because it would hinder network generalization. Positions that are close together in input space should have similar eval.

I am using mostly piece lists (coordinates of each piece).

The input representation is very carefully designed. 80% of machine learning is about feature representation.
Maybe first use a clustering algorithm to cluster a board position. But clustering algorithms are very slow.
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: Giraffe, new release (Aug 17)

Post by matthewlai »

Henk wrote:Maybe first use a clustering algorithm to cluster a board position. But clustering algorithms are very slow.
Clustering training is slow, but once you have the cluster centers, evaluation is very fast.

That was actually attempted a few months ago, but didn't really give an improvement.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
Werewolf
Posts: 2086
Joined: Thu Sep 18, 2008 10:24 pm
Full name: Carl Bicknell

Re: Giraffe, new release (Aug 17)

Post by Werewolf »

So will there be a new version soon? I really hope you continue this after graduation.

Don't let the Giraffe die...
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: Giraffe, new release (Aug 17)

Post by matthewlai »

Werewolf wrote:So will there be a new version soon? I really hope you continue this after graduation.

Don't let the Giraffe die...
I could release a new version. My development version is about 100 Elo higher than this version already.

I just don't want to flood the board with a bunch of Giraffe releases, so I try to accumulate a few improvements before releasing a new version.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.