as @Bass mention I think you can lower the table to
Pebbles left | you have Odd number stones | you have Even number stones
0 | W | L
1 | L | W (1)
2 | W (2) | W (1)
3 | W (2) | W (3)
Let say K is the number pebble left.
when you count the next step as if k is odd then:
is step k-1 lose as even, color 1 stoneIf your nunber of pebbles odd then this move is winningyou open number pebvles even.
is stepFind losing game for k-1,k-2 lose as odd, color 2 stone then this move is winning
is step kk-3 lose as For the even, color 3 stone then this move is winning column If you find one you win else you lose.
same principle for even:
this why I think
Pebbles left | you have Odd number stones | you have Even number stones
4 | L | W (3)
5 | L W(1) | W(1)L
(basically searching if in the diagonal column their is a lose and you go up maximum 3 times)
(sorry cant comment not enough points)