Evaluation Using Flow Graphs

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

Moderators: hgm, Rebel, chrisw

User avatar
towforce
Posts: 11656
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK

Evaluation Using Flow Graphs

Post by towforce »

This idea popped into my head about an hour ago, and it's not fully formed, but how about creating a flow graph for a chess position?

Here's a sample flow graph:

Image

* generate lookup tables for each chess piece for how many moves it takes to move to every square from every other square. From a single piece on an empty board on any square, you could then see how many moves it would take to reach any other square.

* for each piece in the chess position, start by making a weighted graph from the lookup table. Each vertex on the graph would represent a single square on the chess board that the piece could reach

* on each pieces' graph, calculate, from the other pieces' graphs, the resistance at each step in getting close to where the opponent king can get to (weighted by the cost of that king getting to each square on the board)

* opponents pieces' graphs would create resistance to your own pieces graphs (as would, to a lesser extent, your own pieces)

There would be a lot of circular expressions in this set of expressions (X depends on Y, Y depends on Z, Z depends on X), but getting to balance in circular expressions can be done quickly using various methods.

The move to choose would be the one that gives maximum flow to squares close to the opponents king and minimum flow for opponents pieces to get to your king.
Writing is the antidote to confusion.
It's not "how smart you are", it's "how are you smart".
Your brain doesn't work the way you want, so train it!
MonteCarlo
Posts: 188
Joined: Sun Dec 25, 2016 4:59 pm

Re: Evaluation Using Flow Graphs

Post by MonteCarlo »

It's an interesting thought, and I would be curious to see how such an approach played, regardless of its strength (which I suspect would not be so good).

Something like this was the best performing approach to Hex for a while (15-20+ years ago), but has since been superseded by other approaches even there, where it seems more apt to begin with.

Cheers!
Henk
Posts: 7221
Joined: Mon May 27, 2013 10:31 am

Re: Evaluation Using Flow Graphs

Post by Henk »

towforce wrote: Thu Apr 30, 2020 5:10 pm This idea popped into my head about an hour ago, and it's not fully formed, but how about creating a flow graph for a chess position?

Here's a sample flow graph:

Image

* generate lookup tables for each chess piece for how many moves it takes to move to every square from every other square. From a single piece on an empty board on any square, you could then see how many moves it would take to reach any other square.

* for each piece in the chess position, start by making a weighted graph from the lookup table. Each vertex on the graph would represent a single square on the chess board that the piece could reach

* on each pieces' graph, calculate, from the other pieces' graphs, the resistance at each step in getting close to where the opponent king can get to (weighted by the cost of that king getting to each square on the board)

* opponents pieces' graphs would create resistance to your own pieces graphs (as would, to a lesser extent, your own pieces)

There would be a lot of circular expressions in this set of expressions (X depends on Y, Y depends on Z, Z depends on X), but getting to balance in circular expressions can be done quickly using various methods.

The move to choose would be the one that gives maximum flow to squares close to the opponents king and minimum flow for opponents pieces to get to your king.
What about markov chains.
User avatar
towforce
Posts: 11656
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK

Re: Evaluation Using Flow Graphs

Post by towforce »

Henk wrote: Thu Apr 30, 2020 5:51 pmWhat about markov chains.

As it happens, there's a video about Markov chains in chess. As a bonus, it's presented by a pretty girl! :oops: Link.

Looking at that video, it looks as though there's some similarity between Markov chains and flow graphs. However, in the video, only one piece was moved: I can see it getting a lot more complicated when there are a lot of pieces moving.

Another thing is, we're not really interested in the probability of a piece moving to a particular square: we're interested in the resistance to it getting there.
Writing is the antidote to confusion.
It's not "how smart you are", it's "how are you smart".
Your brain doesn't work the way you want, so train it!
Collingwood
Posts: 89
Joined: Sat Nov 09, 2019 3:24 pm
Full name: .

Re: Evaluation Using Flow Graphs

Post by Collingwood »

towforce wrote: Thu Apr 30, 2020 6:49 pm As a bonus, it's presented by a pretty girl! :oops:
I won't try to predict whether Kelsey Houston-Edwards would be happy about your comment.
User avatar
towforce
Posts: 11656
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK

Re: Evaluation Using Flow Graphs

Post by towforce »

MonteCarlo wrote: Thu Apr 30, 2020 5:33 pm It's an interesting thought, and I would be curious to see how such an approach played, regardless of its strength (which I suspect would not be so good).

There could be some negatives:

* it might turn out to be more difficult than expected to get the modelled flows to each king close to reality

* it might lead to an attack against an opponent's king which is not successful - and this could then leave a losing position

Still, for a long time I've had this nagging feeling that chess must be mathematically solvable - that there must be a way to determine which side is winning without generating a game tree. The essence of chess is maximise access to the opponent's king while minimising access to your own king.
Writing is the antidote to confusion.
It's not "how smart you are", it's "how are you smart".
Your brain doesn't work the way you want, so train it!
Henk
Posts: 7221
Joined: Mon May 27, 2013 10:31 am

Re: Evaluation Using Flow Graphs

Post by Henk »

Feeling is worthless for this. Needed is introverted intuition. I don't have it conscious.