This reminds me of bear games: https://en.wikipedia.org/wiki/Bear_games
Here's a tablebase analysis for a simple bear game I constructed a while back: https://emarzion.github.io/coqtbgen/