Using Symbolic Computation to analyze some Children's Board Games
Shalosh B. Ekhad, Doron Zeilberger

TL;DR
This paper introduces a simplified, intuitive symbolic computation method for analyzing children's board games, making complex probabilistic analysis accessible to a broader age range and improving efficiency over traditional Markov chain approaches.
Contribution
The paper presents a novel symbolic computation approach for analyzing children's board games, offering a more accessible and efficient alternative to Markov chain analysis.
Findings
Provides a simpler analysis method suitable for teenagers.
Achieves more efficient computation compared to Markov chains.
Enhances understanding of game probabilities through symbolic methods.
Abstract
In a delightful article that recently appeared in Mathematics Magazine, David and Lori Mccune analyze the board game "Count Your Chickens!", recommended to children three and up. Alas, they use the advanced theory of Markov chains, that presupposes a knowledge of linear algebra, that few three-years-olds are likely to understand. Here we present a much simpler, more intuitive, approach, that while unlikely to be understood by three-year-olds, will probably be understood by a smart 14-year-old. Moreover, our approach accomplishes much more, and is more efficient. It uses symbolic, rather than numeric computation.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsArtificial Intelligence in Games
Using Symbolic Computation to Analyze some Children’s Board Games
Shalosh B. EKHAD and Doron ZEILBERGER
Abstract. In a delightful article that recently appeared in Mathematics Magazine, David and Lori Mccune analyze the board game “Count Your Chickens!”, recommended to children three and up. Alas, they use the advanced theory of Markov chains, that presupposes a knowledge of linear algebra, that few three-years-olds are likely to understand. Here we present a much simpler, more intuitive, approach, that while unlikely to be understood by three-year-olds, will probably be understood by a smart 14-year-old. Moreover, our approach accomplishes much more, and is more efficient. It uses symbolic, rather than numeric computation. The article is accompanied by a general Maple package, CountChickens.txt, that can handle, in a few seconds, any such game, not just this particular one. It is also accompanied by an even more general Maple package UmbralMarkov.txt that handles any “weighted” (discrete time) Markov chain with any number of absorbing states.
The Maple packages. This article is accompanied by two Maple packages CountChickens.txt and UmbralMarkov.txt that can be obtained, along with numerous input and output files, from the front of this article
http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/board.html .
The Count Your Chickens! board game
The board game Snakes and Ladders (that became “Chutes and Ladders” in the USA, since snakes are too scary) is too stressful for the gentle soul of a typical three-year-old, because it has a winner, and hence a loser. Even CandyLand that involves picking colored cards, rather than spinning a spinner, is not recommended, since it suffers from the same problem and three-years-old (and not only) hate to lose, making them cry. Hence game inventor Peggy Brown came up with a fun, stress-free, ‘cooperative’ game [B] for kids, where there is only one team and ‘everyone wins together and loses together’ (so it is really a solitaire game) called “Count Your Chickens!” manufactured and marketed by the Peaceable Kingdom toy company.
In a delightful article that appeared recently in Mathematical Magazine, the mathematical couple David and Lori Mccune, who play this game with their young children, use the sophisticated theory of Markov Chains, that entails a knowledge of matrices - and matrix inverses - to compute the probability of winning, as well as the expected number of chicks at the end. They got for the former and for the latter. Our, simpler, faster, and more efficient approach agrees with their probability, but gave the more precise value of , and got a slightly higher value for the expected number of chicks, namely . [MM]’s stated value of rather than the correct is probably a misprint.
One of us (DZ) wrote a Maple package, CountChickens.txt, mentioned above, that enabled the other author (SBE) to find these quantities for any such kind of board game, and go far beyond mere probability of winning and expected number of chicks. It uses symbol crunching rather than number crunching, and has many fewer ‘states’, making the computations extremely fast.
But let us first define an ‘abstract’ Count Your Chickens! game.
Let and be two positive integers. The game consists of
A board with squares where the location is the starting place of Mama Chicken and is the terminal square. Each square is either empty or labeled with one of animals.
a spinner with choices, all equally likely, labeled by the animals, plus an extra one called the Fox.
a subset of called the set of blue squares.
The rules are as follows. Mama Chicken starts out at location . At every turn, the player spins the spinner. If it is a Fox, then you lose a chick (if you currently have no chicks, then nothing happens) and stay where you are. Otherwise you go to the next location labeled by the animal that you got. The three-year-old counts the number of squares moved and collects that number of chicks. If the new location is a blue square, then you get an extra chick.
Sooner or later, with probability , you would get to the terminal square, that is labeled by all the animals.
You win the game if you have at least chicks, and otherwise you lose.
In the simplified example of [MM], N=8, K=2, the board is
[TABLE]
and the set of blue squares is .
In the actual game[B], and . The board is as follows
[TABLE]
[TABLE]
(where C:=Cow, D:=Dog, P:=Pig, S:=Sheep, T:=Tractor, and [math] indicates an empty square) and the set of blue locations is
[TABLE]
In [MM] the game is modeled as a Markov chain with a huge number of states, each of the form (location, Current Number of Chicks), essentially . For the problem of just computing the probability of winning (for ), they manage to reduce it to states, but for the harder problem of computing the expected number of chicks at the end, they needed states, and the matrices were huge.
Our approach also makes use of Markov chains, but we don’t need any of the standard theory, and we never mention the word ‘matrix’. Also our number of states is (obviously the EMPTY squares can be ignored). We use Gian-Carlo Rota’s seminal idea of an umbral operator.
Let be the probability generating function of landing at square , where the coefficient of is the probability that you currently have chicks. To indicate the fact that it is currently at location we will denote it by . If you got a Fox this becomes (followed by replacing by , if necessary). Otherwise, Mama Chicken goes to a new location, let’s call it , and the new state becomes if is not a blue square, and if it is. If we get a power of larger than , we replace it by .
This introduces an ‘evolution operation’ that we call the pre-umbra.
In the simplified game used in [MM], (whose board was given above), we have
[TABLE]
[TABLE]
[TABLE]
[TABLE]
[TABLE]
[TABLE]
(since is an absorbing state).
These operations must be followed by a “clean-up” operation. Replacing by (you can’t have a negative number of chicks), and replacing by .
This is the pre-umbra, defined on every monomial , let’s call it . If we have a polynomial in (and of course ), we extend it by linearity. (Recall that every polynomial is a linear combination of monomials). We call this linear extension the umbra and also denote it by .
It is readily seen that applying this operator, starting with the initial state , describes the ‘evolution’ of the process.
While, in principle, the game can last forever (if you are really unlucky, you may keep getting foxes), life is finite, so we decide that we are playing at most rounds, and make large enough so that the probability of lasting longer than rounds is negligible.
The probability generating function after round is . After two rounds is , etc.. Sooner or later we will encounter (in general ), here is our algorithm.
Let be yet another variable.
Input: An arbitrary Count Your Chickens! game, , with locations, animals, and a given set of blue squares, and positive integer , and two variables and .
Output: A polynomial of degree in and degree in , such that the coefficient of is the probability of ending the game after exactly rounds with a capital of chicks. It also outputs the probability of the game lasting longer than rounds.
We first initialize
[TABLE]
and then for , we define, iteratively,
[TABLE]
[TABLE]
[TABLE]
The output is , that tells us all the statistical information for finishing in rounds, and indicating the probability of not terminating in moves. You choose large enough so that is negligible.
Note that is a polynomial of the two variables and of degrees and respectively. This contains much more then just the probability of winning and the expected number of chicks. If is tiny we can approximate the real thing by and then is the bi-variate probability generating function of at the end.
(More precisely is the conditional probability generating function conditioned on terminating in rounds. From now on let ).
The probability of winning is the coefficient of in . The expected number of chicks is . The expected number of rounds is . Similarly, we can find the variances, the correlation, and any desired higher moments.
This is implemented in procedure ChSer(CB,t,X,M) in the Maple package CountChickens.txt. Typing
ChSer(CCb1(),t,X,60);
gives the rather long that can be seen in the output file
http://sites.math.rutgers.edu/~zeilberg/tokhniot/oCountChickens1.txt .
The more succinct command Info(CB,M) uses to extract the desired statistical information.
In particular the probability of winning turns out to be
[TABLE]
and the expected number of chicks, at the end of the game is
[TABLE]
If you have any doubts, we also have a simulation program that plays the game many times, and takes the empirical averages. See
http://sites.math.rutgers.edu/ zeilberg/tokhniot/oCountChickens4.txt ,
where the game is played one million times, and the empirical averages are very close to the above theoretical values, confirming that the value of chicks in [MM] was a misprint.
We also found that the variance of the number of chicks is that is rather small (explaining why the simulation values were so good), the skewness is and the kurtosis is .
The average number of rounds happens to be and its variance is . The correlation between the number of chicks and the number of rounds is .
The more general Maple package UmbralMarkov.txt
What we have here is what we call a Weighted Markov Chain with one absorbing state. A general weighted Markov chain with non-absorbing states and absorbing states is a directed graph on vertices where the out-degree of each of the absorbing states is [math], for each non-absorbing state there is a probability distribution among its outgoing neighbors, and in addition each edge carries a weight. You can think of the weight of a directed edge as the price that you have to pay every time you use it. As you travel along this directed graph, according to the transition matrix, sooner or later you will wind up in an absorbing state, and then you have a probability distribution regarding the total price of the travel, for each of these absorbing states. You can also impose a “minimum” total price and a “maximum” one, like in the ‘Count Your Chickens!’ game.
This more general scenario is implemented in the Maple package UmbralMarkov.txt available from the url mentioned above, where there is also some sample output.
References
[B] Peggy Brown, “Count Your Chickens!”, a board game for ages , manufactured by Peaceable Kingdom.
[MM] David Mccune and Lori Mccune, Counting your chickens with Markov chains, Mathematics Magazine 92 (2019), 162-172.
Shalosh B. Ekhad, c/o D. Zeilberger, Department of Mathematics, Rutgers University (New Brunswick), Hill Center-Busch Campus, 110 Frelinghuysen Rd., Piscataway, NJ 08854-8019, USA. Email: ShaloshBEkhad at gmail dot com .
Doron Zeilberger, Department of Mathematics, Rutgers University (New Brunswick), Hill Center-Busch Campus, 110 Frelinghuysen Rd., Piscataway, NJ 08854-8019, USA. Email: DoronZeil at gmail dot com .
Exclusively published in the Personal Journal of Shalosh B. Ekhad and Doron Zeilberger and arxiv.org .
Written: July 18, 2019.
