Awari Solved 301
Gerard Jendras sent in a submission about applying computing power to an ancient game. The game of Awari has been solved: with perfect play, the game always results in a draw. There is a Java applet to test your skills against.
more about the game (Score:4, Informative)
This is more commonly known as Mancala in the US.
An adaptation (simplified) of the game was used as a problem in last year's International Olympiad in Informatics: see the description of the problem here [win.tue.nl]. For a description of how to solve it efficiently, see this booklet [win.tue.nl].
Re:more about the game (Score:2, Informative)
Actually, there are many (i believe i heard something like 1200) different varieties of the game being played all around Africa, sometimes different games with the same name, sometimes different names for one game. As it says in the article, this particular variant is also known as wari, owari, awale, etc. etc.
Some of the variants feature bigger boards, and some even include the possibility of endless moves. Many of those are more complex or have bigger search spaces than the game from the article.
So it seems there is still hope for mancala fanatics...
Awari in Quest for Glory... (Score:2, Informative)
Fun (Score:2)
How about information on Japanese games?
Re:Fun (Score:2)
Amazing. (Score:5, Funny)
Re:Amazing. (Score:2, Insightful)
Speaking of computer AI...... (Score:3, Funny)
all 889,063,398,406 positions (Score:5, Funny)
Dr. John W. Romein and Prof. dr. ir. Henri E. Bal solved the game by developing a program that computes the best move and eventual outcome for all 889,063,398,406 positions that can possibly occur in a game. The results are stored in a database that is 778 gigabyte large. The database was computed on a large computer cluster with 144 processors. A new and fast, parallel algorithm managed to compute the database in only 51 hours. Each processor accounted for part of the postitions, but the processors closely co-operated to determine the best moves. One complication was that the available main memory, 72 gigabyte, was by far not large enough to hold the entire database. Another problem was the heavy communication between the processors; a total of 1.0 petabit (= 10^{15} bits) was sent over the interconnection network.
Next thing I know, someone is going to try programming the database in perl. ;-)
Wow...... (Score:3, Funny)
Re:all 889,063,398,406 positions (Score:3, Insightful)
I did wonder about cranking up the lookahead depth to try and solve the game - after all, most games the program played it won within 25 moves or so - but each extra level of lookahead roughly triples the run time. After seeing the hardware used by these two chaps it seems that the problem was a bit bigger than I thought. I had considered using a Postgres database to store the lookup of the best move at each stage - lucky I didn't, it would have been completely slaughtered
The owari-playing program is at http://membled.com/work/owari/owari.c if anyone is interested - that directory also contains a Perl front-end which caches the computed best moves. I used that to automatically build up a database of 'openings' computed to a slightly higher lookahead level. I was planning to package up the program and release it, perhaps moving the minimax code into a library. But now the game of owari has been solved, I guess there isn't much point any more
BTW you can easily un-solve it just by playing with fourteen bowls and twenty-eight stones - it would take them several times longer to find the solution to that.
I wonder if all possible (symmetric) owari games are draws when played with the best strategy?
Come on, he didn't say it was easy (Score:3, Insightful)
Re:Come on, he didn't say it was easy (Score:2)
Hindsight is easy; let's hear your "elegant" plan to ouster Saddam.
Uhhh. (Score:5, Funny)
double Uhhh. (Score:2)
Or maybe that's why you don't like games where you can't blame luck/lousy cards/...
Re:double Uhhh. (Score:2)
Re:double Uhhh. (Score:2)
Checkers, Chess, Go, Reversi (=Othello(tm)), most Chess variants . . .
Re:double Uhhh. (Score:2)
Checkers (Chinese and domestic)
Chess
othello
go
None of these have any chance. They don't even have hidden information known to one player and not the other.
Re:double Uhhh. (Score:2, Insightful)
Just my two cents...
Re:double Uhhh. (Score:2)
A human can screw up playing tic-tac-toe too, it's just not that likely. When most people refer to a "game of chance" they mean something where randomness is supposed to be a fundamental part of the game, such as games that use shuffled decks of cards or dice.
Re:double Uhhh. (Score:2)
Re:double Uhhh. (Score:2)
You might think that an opponent could fool this strategy by making a few moves that the computer didn't expect. This is possible if the computer is not playing a "perfect" game. If it is playing a perfect game, then it would be able to follow your moves all the way to the end of the game and see that you could win. Therefore, it would expect you to make those moves and take whatever steps were available to it to keep you from being able to make those moves in the first place.
Most annoying game ever (Score:3, Funny)
Re:double Uhhh. (Score:2)
Re:double Uhhh. (Score:2)
No you don't.
Re:Uhhh. (Score:2)
Re:Uhhh. (Score:2)
Re:Uhhh. (Score:2)
"Your bargaining posture is highly dubious."
3500 year old technology (Score:3, Interesting)
Re:3500 year old technology (Score:2)
Re:3500 year old technology (Score:5, Funny)
* Copyright 2002 Micah Dowty <micahjd@users.sourceforge.net>
*
* Enter your moves using this key:
* 0|1|2
* -+-+-
* 3|4|5
* -+-+-
* 6|7|8
*/
#include <stdio.h>
#define E " | | \n"
#define F "-+-+-\n"
#define L(x)b[x/3*12+x%3*2]
#define P(x)e=x<0?e:x;
#define R(a,b,c,p)if(L(x)==a&&L(y)==b&&L(z)==c)p=z;
&nbs
int x,y,z, e,i,v,o,h,
X=88,S=32, O=48,r[]={
0,1,2,3,4, 5,6,7,8,0,
3,6,1,4,7, 2,5,8,0,4,
8,2,4,6};char b[]=E F E F E;void a(int
x,int y,int z){if(L(z)==S)e=z;R(O,O,S,
v)R(X,X,S,o)R(X,S,S,h)}void l(){for(i=
0;i<24;){x=r[i++];y=r[i++];z=r[i++];a(
x,y,z);a(y
y,x);a(x,z
x);a(z,x,y );if(L(r[x
])!=S&&L(r [x])==L(r[
y])&&L(r[y])==L(r[z]))exit(printf("%s"
"You Lose\n",b));}}int main(){puts(b);
for(;;){i=getc(stdin)-O;if(i>(e=v=o=h=
-1)&&i<9&&L(i)==S){L(i)=X;l();i f (e<0)
exit(1-1&& printf("%"
"sCat's G" "ame\n",b)
);P(h)P(o) P(v)L(e)=O
Re:3500 year old technology (Score:2)
O.1: corner (any one, they're all symmetric)
X.2: corner (on the diagonal not taken by O)
Actually
X.2: corner (opposite the corner taken by O)
is a much better move. Yes, this creates XXO on the diagonal.
With perfect play it is still a draw, but in my experience humans blow this position most of the time.
-
Re:3500 year old technology (Score:2)
Sheesh, the didn't solve the game 3500 years ago. What's so mathematically astounding about it? A game has three possible outcomes: draw, first player to move always win, second player to move always win. None of the outcomes are more "pure" than any of the others./p:
Re:3500 year old technology (Score:2)
Re:3500 year old technology (Score:2)
Re:3500 year old technology (Score:2)
Re:3500 year old technology (Score:3, Funny)
Re:3500 year old technology (Score:2)
He he.
But technology progress stopped for thousands of years when the King declared that upgrading every 2 years was a royal pain in the back and forbid future upgrades.
And that bronze sh*t was all just a fad.
Here's another one I just invented (Score:2)
Player 1 drops his boulder.
Player 2, in turn, drops his boulder.
Both players pick up the boulders again, unless one of them has managed to reach the ground. Rounds continue until the game is over.
If either player's boulder reaches the ground at the end of a round, the game is over, and that player wins. If both players reach the ground at the end of the round, the game is declared a draw.
Re:3500 year old technology (Score:2)
Re:3500 year old technology (Score:2)
The human brain hasn't changed that much in 3500 years; we were a pretty smart bunch back then. And of course, we didn't have computers so we actually used it now and then.
RMN
~~~
With enough storage, Chess could be solved too. (Score:2, Insightful)
Chess has a finite number of squares and a finite number of pieces, thus the total number of possible boards in chess is also finite.
With sufficient storage and proper linking of data, the decision for the next move could be reduced to simply following the chain that leads the highest probability of success.
Considering that either side can use the same data, it is possible with perfect play chess would also lead to a draw every time.
Re:With enough storage, Chess could be solved too. (Score:2, Informative)
Re:With enough storage, Chess could be solved too. (Score:2)
You would have to come up with a way of encoding trillions of positions in one electron, or something
Re:With enough storage, Chess could be solved too. (Score:2, Informative)
Accept a draw offer
Get stalemated (no legal move, but not in check)
Repeat the exact same position (same player to move, same en-passant square, etc.) 3 times (not necessarily in a row, or in check either)
Make 50 moves without moving a pawn or capturing a piece
Re:With enough storage, Chess could be solved too. (Score:2)
Re:With enough storage, Chess could be solved too. (Score:2)
Eh?
And, what attack pattern can a rook offer that a queen can't?
I suppose that a rook can castle, but not if moved from it's home square. Hmm, does this mean that a pawn promoted to a rook, returned to a rook's home square, can castle? I'd think not since the rook that was there was already moved.
Re:With enough storage, Chess could be solved too. (Score:2)
Re:With enough storage, Chess could be solved too. (Score:2)
Re:With enough storage, Chess could be solved too. (Score:2)
This sounds just like the solution Data used... (Score:2, Interesting)
What is the alternative? (Score:2)
Re:What is the alternative? (Score:2)
Important Step? (Score:5, Insightful)
From the article:
"The research is an important step forward in a research area within Artificial Intelligence, to solve games with increasing complexity"
I don't quite understand why a big lookup table is an important step for AI. Humans don't play games by checking every possible move and picking the best one and never will.
The AI community really needs to stop looking for tricks that allow computers to solve problems in ways that humans never could and instead spend their time trying to understand how intelligence actually works.
Hint: scrap predicate logic (and in doing so the Turing machine) as the model for intelligence. Instead, define a model from which predicate logic can emerge (Reginald Cahill has more or less done this, but I'm not sure if he realizes it yet: Process Physics [flinders.edu.au].).
-Chris
Re:Important Step? (Score:2)
The AI community really needs to stop looking for tricks that allow computers to solve problems in ways that humans never could and instead ...
Well... I understand the feeling ("just a huge brute force thing, nothing intelligent"), but consider your statement for a while. You are saying that researchers should NOT research methods humans do not use, but should try to simulate humans. While it is useful to try to understand the best information processor in existence that we know of (human brain), shouldn't it be even more interesting to find new ways of solving problems, methods this ultimate processing machine can not do? That is, to study these methods humans brains do NOT use? Otherwise, the best we could do would be just cloning existing system.
Developmental Computing (Score:2)
Interesting stuff. While the jury is still most definately out, he has made some very real progress in some areas many other approaches are finding very difficult. For instance, he has a robot that can navigate the Engineering building with only two or three walkthroughs of the place. Sounds mundane, except that no other technique can come close in such a real-world environment.
I think you'd enjoy reading his stuff. It is being done by a few people; time will tell whether more will pick it up.
Re:Important Step? (Score:2, Insightful)
The AI community really needs to stop looking for tricks that allow computers to solve problems in ways that humans never could and instead spend their time trying to understand how intelligence actually works.
Yeah, and the automobile industry ought to stop using tricks like "wheels" that allow cars to move in ways that humans never could, and switch to building giant two-legged robots.
Re:Important Step? (Score:2)
So, excercises in deep search ARE sort of like Artificial Intelligence, in a way. It just seems kind of pointless when the whole game is solved - that's something no human would ever be able to do.
Re:Important Step? (Score:2)
Good chess players think in terms of "blocks" on the board. They don't see individual moves and peices, they see larger conceptual board positions and sets of interrelated peices that confer advtanges to one side or the other, and they see "patterns" that are difficult to define in explicit terms. It was in one of Hofstadter's books this was brought up in examining how humans play chess.
Re:Important Step? (Score:3, Informative)
I think you're quite correct here. Brute force isn't a reasonable solution to most interesting realworld problems, and it's hard to see how this approach is instructive for future AI research.
Humans don't play games by checking every possible move and picking the best one and never will. The AI community really needs to stop looking for tricks that allow computers to solve problems in ways that humans never could
Ah, now I think you're overstating things a bit. It sounds like your objection is predicated (sic) upon the assumption that the sole purpose of AI research is to reproduce biological, and finally human, intelligence, and that the way biological brains do it is the only way it can be done. I think that's not necessarily the case.
In the first matter, there's plenty of higher-order problems that we might want solved, and there's no reason to suppose that a human thought process is the best way to go about things. The sole purpose of AI research isn't to pass a Turing test. A truly artificial intelligence, that solves hard problems in exotic ways would still be a very interesting and useful thing to possess, even if one couldn't talk sports with it.
In the second matter, it's still a contentious matter whether human-like intelligence could ever be built with hardware and software components like the ones we have today. In the event that it is, it's quite possible that the artificial solution would take a radically different path than the biological - a path worthy of exploration, interesting even if it ends in a blind alley.
That's not unlike saying that birds fly by flapping feathery wings, and thus so should passenger aircraft - they're solving different problems, and with different means.
Study of the biological solution is instructive - mere apeing of it isn't.
Re:Important Step? (Score:2)
If you take any strategic game, a human player will consider all of the possible moves that they can think of, whether or not these include all possible moves as defined by the rules of said game.
How does this differ from human intelligence? Surely the fact that the machine can utilise a full range of options makes the machine more intelligent?
Re:Important Step? (Score:3, Interesting)
What AI wants is code that plays, observes the results, and converges to perfect play. One such algorithm has been produced and perfect play has been determined. Now the question is can an algorithm that converges *faster* be found. Learning speed can now be objectively measured, which opens a whole new scientific basis for studying AI.
Agreed, probably dumb pr person (Score:2)
Agreed. It's not important at all. It's probably just some pr flack who was looking for an interesting angle and didn't actually check with the researchers who did the work.
As for what "the AI community" are doing, might I suggest that they *are* trying a whole bunch of different approaches. None seems to offer the holy grail yet.
depends on what you call perfect (Score:5, Insightful)
The thing that's interesting is making a program that plays as well as possible against imperfect players, as demonstrated by the RoShamBo Programming Competition [ualberta.ca].
a perfect game is a perfect game (Score:2)
If both players play a perfect game, awari results in a draw. If the opponent makes a mistake, the perfect game will result in *at least* a draw but may result in a win.
The computer has a *huge* database of *every* possible valid configuration of pieces. Whenever the other player makes a move, it simply prunes all moves that are impossible to make and only considers the best of the valid sequences. There is no guessing as the computer knows *everthing*.
I'm sure the algorithm is not that simple, but I believe that's the gist of it.
Try a search on google for backtracking algorithms and red-black trees.
PS. my apologies if this is not what you were getting at.
Re:depends on what you call perfect (Score:3, Informative)
In this instance, no matter what move you make the computer knows what every possible board combination from now to the end of the game can look like.. You can't throw him for a loop with imperfect play because he will have already 'predicted' (by way of a simple scoring algorithm) the possibility that one of your moves could result in weakining his position and he would have avoided making the move that allows you to make that move.
Your observation makes a bit more sense in chess, since chess isn't really "solved" yet (far more possible move combinations than in this game). But once a game is "solved" in this manner, you'll never beat the computer, ever, no matter how clever you are unless the game is flawed (one player has an inherent advantage) or the computer has a programmer error.
Another way to look at it is Tic-Tac-Toe. Tic-tac-toe is simple enough that it can be 'solved' in the human mind by any reasonably intelligent person. If you play against such a person, you'll never win no matter how 'tricky' your moves..
Re:depends on what you call perfect (Score:2)
Re:depends on what you call perfect (Score:2)
Game board/peices? (Score:2)
http://www.cs.ualberta.ca/~awari/
Wow, that Awari game looks quite cool. Does anyone know where I can get one, possibly hand made (doesn't need to be 3500 years old though). It seems way cooler than just a basic chess board (though its cool to have a nice one of those too).
The stones look like those that you can buy, just polished rocks. But the cool fold-up game board is nice. Carved from wood, it would be damn nice to have in the living room. You could even bring it down to the local coffee shop instead of a deck of cards ;-)
Re:Game board/peices? (Score:4, Funny)
Re:Game board/peices? (Score:2)
Kind of Bummed - Just Brute Force (Score:5, Insightful)
Zetetikos
Next up... (Score:2)
Seriously, how long until Go or Go-Moku is cracked? And how many people will damage themselves if chess is ever solved?
Re:Next up... (Score:2)
I can see it now... (Score:3, Funny)
Minimal system requirements:
distributed computer cluster with 144 Athlons XP+2600
72 Gb of RAM
778 gigabyte free disk space
1.0 petabit Ethernet card
Re:I can see it now... (Score:2)
Now crawl back into the hole you unfortunately emerged from.
Re:I can see it now... (Score:2)
I can't find your funny comment. Since you're an expert on humor, can you show us your contributions?
Re:I can see it now... (Score:2)
"Contributions"? What are you, this guy's mom?
FOAD
The key to winning awari is to lie (Score:2)
The optimal state of any linear game is a draw (Score:2)
More complex games that are non linear and have multiple simultaneous gaming moves will not end in draw even with two perfectly matched opponent groups because of the effect of moves that only partially account for one another. Bridge comes close to such a game.
Re:The optimal state of any linear game is a draw (Score:3, Insightful)
Re:The optimal state of any linear game is a draw (Score:2)
Awari is only ONE type of Mancala (Score:2, Informative)
I just returned from Kenya and Tanzania where I bought a Mancala borard for a local gamed called Bau (also spelled Bao). It is a lot more complicated than Awati and some say it is the most complex form of Mancala.
Mancala variant which has not been solved (Score:2)
- Sam
Add more holes (Score:2)
You can never get enough holes.
Does it make sense? (Score:2)
They claim the game has over 800 billion distinct game positions - yet they computed a database to fully solve the game that took only 778GB of space. Doesn't this seem odd? You'd have to describe each position with an 8-bit number to fit them all, and that leaves no room for any other data (such as how they relate). What magic did they pull here?
Re:Does it make sense? (Score:2)
The 8-bit identity could be implicity defined by the data's position in the database.
For example, assume 0 = inevitable win for player 1, 1 = inevitable loss for player 1, 2 = inevitable tie, and 3 = unknown (i.e. 2 bits of data per position). Now assume that we only need 2 bits to store the game state. If we have a database of (2, 1, 3, 0). In only 8 bits of data, we've encoded that position 0 has result 2, position 1 has result 1, position 2 has result 3, and position 3 has result 0.
Re:Freecell Solitaire... (Score:5, Interesting)
Re:Freecell Solitaire... (Score:2, Interesting)
It's basically normally sorted, but with aces, twos and eights on the first two rows. Nines and sixes are at the bottom and you can't climb up high enough to get to the aces.
They need to update the help (Score:2)
At the time they wrote the help file that was true. Eventially somebody found that at least one game is not solveable (other posts tell you which). Now the help file is out of date - unless they have updated it since your version. I haven't read the help file in 6 years, back then it was not known yet that one game was unsolveable.
Re:Freecell Solitaire... (Score:2, Informative)
freecell-solver [technion.ac.il]
Re:Freecell Solitaire... (Score:2)
It is not true. [cs.uu.nl] Proof by counter-example.
Re:Freecell Solitaire... (Score:3, Funny)
Let me guess... you currently answer phones for a living?
Re:Freecell Solitaire... (Score:2)
At that rate you should hit game number 11982 around Feburary 2004. Good luck
-
Re:Chess (Score:3, Informative)
You're thinking of Go [google.com].
Re:Chess (Score:4, Funny)
Re:Chess (Score:2)
Re:perfect play? (Score:2)
So you can assign win/draw/lose to every move that leads to one of these positions, and so on.
By induction, every position is won, drawn or lost for each player, if they play perfectly. Geddit?
Of course if one player plays perfectly, and the other doesn't then the perfect player can often snatch victory or a draw from the jaws of defeat, cos the imperfect player often makes an inferior move. And, usually both are imperfect.
Of course (Score:2)
RMN
~~~
Re:a perfect game (Score:3, Interesting)
you have a pile of 21 matches. players alternate turns. on your turn you may take either 1, 2, or 3 matches. whoever takes the last match LOSES.