This is a demo of what can be done with a little AI in the web browser. This is an implementation of an AI that plays the "tye 21" that was played on the "Survivor" TV show. The game rules are quite simple. There are 21 flags and 2 teams/players. The players alternate turns every round. Every turn a team closes either one, two or three flags. The objective it to get the last flag.
Inital Matrix
\begin{bmatrix}00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\\end{bmatrix}
Table of stats
| Input | Correct Answer | AI answer | Traning rounds | Confidence |
|---|---|---|---|---|
| 1 | 1 | |||
| 2 | 2 | |||
| 3 | 3 | |||
| 4 | 0 | |||
| 5 | 1 | |||
| 6 | 2 | |||
| 7 | 3 | |||
| 8 | 0 | |||
| 9 | 1 | |||
| 10 | 2 | |||
| 11 | 3 | |||
| 12 | 0 | |||
| 13 | 1 | |||
| 14 | 2 | |||
| 15 | 3 | |||
| 16 | 0 | |||
| 17 | 1 | |||
| 18 | 2 | |||
| 19 | 3 | |||
| 20 | 0 | |||
| 21 | 1 |
Resulting Matrix
\begin{bmatrix}00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\00.00&00.00&00.00&00.00\\\end{bmatrix}