# Two player mushroom hunting game

The game is set across 1 dimension plane or on an axis if you will. The number of points that say which location currently occupied by a player is equal to '2N+1' and they are numbered from '-N' to 'N' (with 0 in the middle). 'N' and '-N' are neighbouring fields.

Players are allowed to be positioned at the same location at the same time, they can "cover" one another.

'k' is the number of mushrooms, collecting one gives one point. The positions of mushrooms are given, they are equal to m1, m2, m3...mk for each mushroom.

's1' and 's2' are the starting locations for player 1 and player 2, where 's1' equals 'N' and 's2' equals '-N'.

There is one dice. 'l' is the number of the dices walls, if 'l' equals 7, then the dice can roll -3, -2, -1, 0, 1, 2, 3. The problem can be complicated by a non-evenly distributed values on the dices walls. Example: 'l' equals 7, with non-evenly distributed values, dice can roll values of: -3, -4, 1, 5, 6, 3, 3.

Players pick up a mushroom if they land on the position containing one. After the pickup the mushroom from this field is not available to the other player.

The victorious player is the one with higher number of mushrooms collected or in the case of equals number of collected mushrooms the player that wins is the one who reached the position 0.

Case 1: The game ends when one of the players reaches position 0, or goes beyond it. Case 2: The game ends when one of the players reaches exactly position 0.

The question is how to find the probability of player 1 victory.

Where should one look for an algorithm that could help create matrix equations to solve the problem numerically?

The probability of rolling a value 'a1' on the dice, where the values are $a_1, a_2, ..., a_l,$ corresponds to probability of $p_1/P$ where $P = p_1 + p_2 + ... p_l$. The values of $p_1, p_2, ..., p_l$ are decided before the calculation begins.