4 ms·
There are 9 cells in the game that each can be empty, X, or O. So three states. That is 3^9 = 19683 maximum possible states of the game. 170MB seems like an aw
by p4bl0 3y ago
There are 9 cells in the game that each can be empty, X, or O. So three states. That is 3^9 = 19683 maximum possible states of the game.
170MB seems like an awefull lot.
- peterhull90 3y ago> Popovertarget passes every choice made by the player, for example: x1-o2-x3 means X chooses the first position, O chooses the second and X chooses the third, and so on. I think this is going to lead to a lot of redundant states, isn't it, because there are multiple paths to get to a particular board layout?
- shultays 3y agoThere would be a lot of illegal states in that number.
- p4bl0 3y agoOf course, that's why I said "maximum". That strengthen my point.
- p4bl0 3y agoIt seems there are only 5478 valid boards. See my script here: https://news.ycombinator.com/item?id=38266987 https://news.ycombinator.com/item?id=38266987