Artificial intelligent assistant

Find the Grundy number of the initial position and make the first move in a winning strategy for the following game > Find the Grundy number of the initial position and make the first move in a winning strategy for the following game: > > In a pile there are two red balls, four green balls, four blue balls, and six white balls. A player can take a (non-zero) number of balls of same color: one red, or one or two green, or one, two, or three blue, or up to four white balls. How do I do this? I've only ever done Nim games with multiple piles; never have I had one pile with multiple types of objects in one pile.

HINT: Since in any move you can take only balls of one color, you really have four separate piles:

$$\begin{array}{ccc} &&&\circ\\\ &&&\circ\\\ &\color{green}\bullet&\color{blue}\bullet&\circ\\\ &\color{green}\bullet&\color{blue}\bullet&\circ\\\ \color{red}\bullet&\color{green}\bullet&\color{blue}\bullet&\circ\\\ \color{red}\bullet&\color{green}\bullet&\color{blue}\bullet&\circ \end{array}$$

The red pile is one-heap takeaway with a limit of $1$ ball per move; the green pile is one-heap takeaway with a limit of $2$ balls per move; the blue pile is one-heap takeaway with a limit of $3$ balls per move; and the white pile is one-heap takeaway with a limit of $4$ balls per move. Your game is in effect the sum of these four simple games.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 1652bd0424cef54fe2b3ad9686ce4ca8