The Flow Game

I am learning mathematics and want to be a mathematician, right? Well, when you do that you end up learning a lot of interesting proofs, theorems, and results - and how they can be used for practical applications and real-life stuff. *Especially* things like videogames.
Hell, almost all of the early 2.5/3D real-time rendering algorithms by people like John Carmack or Ken Silverman were just programmatic implementations of 3D rendering techniques that were limited to just theoretical papers up until that point. The famous inverse square root hack from a Quake game is based on a particular quirk of binary numbers and their base-2 nature. F.E.A.R. - one of my favorite shooters - has famously intelligent enemies that came from taking and applying an AI technique that it's programmer would get a Master's for developing. The applications of math are all over the ground.
However, my mathematics focus of graph theory typically is a little bit less applicable to things like videogames, with occasional uses for pathfinding but not much else. This frustrated me, and I always wanted to make a game that relies on graph theory in some way. Eventually, I found a way.


A graph is basically a network - a set of nodes connected together with edges. A digraph is a graph where the edges are directed - edges are one-way, like arrows that point from one node to another rather than just being a string that connects two together.
A weighted edge is an edge with a number attached. A flow is a way of assigning numbers or weights to a digraph's edges so that the amount of "weight" that points into each node from the edges going into it equals the "weight" that points out from the nodes leaving.
Seymour's theorem says that all 2-connected digraphs have a nowhere-zero flow of maximum capacity 6 - basically, as long as your graph is connected enough you can have the number weights going into and out of each node equal - without any edges having weight 0 or weight bigger than 6. And generating a graph with that connectivity is very easy.


None of that means much, how do you play? Simple. When you boot the game, you will see a bunch of circles - nodes - and red and green rectangles - edges. The green side of the rectangle represents where the edge points into, and there's a number in the middle of the edges that shows the weight. Left clicking increases an edge's weight, right clicking reverses the edge's direction. All that remains is to set the edge weights and directions so what goes into each node equals what goes out. It's always possible, but not always easy!


PLAY THE FLOW GAME TODAY!


Return to Videogame Hub
Return To Main Page