I've been wondering how to abstractly describe a finite impartial game, and if there exists a standard way to do so, similar to how one would define a metric space $(M,d)$.
I've read this related question: Definition of game in game theory
However I'm not sure if this is a good solution, specially since I have no idea how to define the set of strategies and the payout function from only the rules of the game.
The game in question is played on a square board, where players may place pieces on squares depending on the number of placed pieces adjacent to said square. Is there any way to define a game from the board shape and the rules for placing pieces on squares, under normal play?
An impartial game is just an acyclic directed graph, so you can use that definition from graph theory. Namely, an impartial game consists of
A finite* set, $S$, of game states.
A set, $M\subseteq S\times S$, of allowed moves. If $(s,t)\in M$, it means that you are allowed to move from $s$ to $t$.
This must satisfy the following property, ensuring the game has no cycles, so must end:
In your case, $S$ would be the set of subsets of your board, representing the places on the board occupied by pieces. You would say that $(s,t)\in M$ if $t$ has exactly one more element than $s$, and the unique element of $t\setminus s$ satisfies whatever local conditions you want to impose.
* You can remove the finite condition, but then you have to replace the "no cycles" condition with a "no infinite move sequences" condition. It seems finite is sufficient for your purposes.