Can there be computational soccer? This fall I was trying to explain to some kids that the most dangerous place for attackers to have the ball is right in front of the goal where they can get off a good shot. Then it occurred to me the second most dangerous place is where someone can pass it to the attacker, the third region would be where a pass can be made to the second region, etc.. (The goal is on the left.)
Here I took the dimensions of a under-8 field, being 30 yards by 40 yards with a 12 yard goal. With the assumption of a reliable pass of 5 yards, the field gets partitioned into many regions, possibly explaining some of the differences with adult soccer (longer passes can be considered reliable).
At first I tried to use Regions, e.g. RegionDistance, but I wasn't able to get that to work (Does anyone know how to do that?) and then tried this solution that splits the field into a bunch of points, makes a Graph object, then the Graph functionality splits the field up.
points = N[
Flatten[Table[{i, j}, {i, 0, 40, 1/2}, {j, 0, 30, 1/2}], 1]];
edges = Flatten[
Table[If[EuclideanDistance[points[[i]], points[[j]]] < 5,
If[points[[i, 1]] == points[[j, 1]], {i -> j, j -> i}, j -> i],
Nothing], {i, Length[points]}, {j, i + 1, Length[points]}]];
graph = Graph[Join[edges, Table[i -> "Goal", {i, 20, 42}]]];
Graphics[Map[{RandomColor[], Point[points[[#]]]} &,
Complement @@@ Partition[Table[VertexList[NeighborhoodGraph[graph, "Goal", d]], {d, 10, 1, -1}], 2, 1]]]
Then I changed it so the "most dangerous" region has the requirement that the angle of the goal is at least 1/2 radians (if the goal's perspective is too narrow it is hard to get past the goalie).
These pictures are not too profound, but maybe someone can do a simpler or more aesthetic solution.
One can think of this as being a physics-inspired solution (field theory of soccer), where every possible pass on the field is taken into consideration. But maybe there are some classical mathematical solutions?
Speaking of physics, what would be the equipotentials be if the net were given a charge (e.g. the two nets could be capacitors) Normally the net is irrelevant but if it had a charge how could that affect a charged ball trying to get into the net)?