michi

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Angrim
Posts: 97
Joined: Mon Jun 25, 2012 10:16 pm
Location: Forks, WA
Full name: Ben Nye

Re: michi

Post by Angrim »

Isaac wrote:
lucasart wrote:The true beauty is when you create infinite complexity with simple rules: that is what makes Go beautiful and Shogi comparably ugly, in my opinion.
In my opinion the rules of the game of Go are extremely complex, in particular the counting part. There are many rules for counting (Japanese rules, Chinese rules, etc.) and I don't think they are easy at all. Most go programs aren't programmed to count with Japanese rules for instance (or when they do, they have bugs that makes them lose in the end, that happens for Zen for example).
Even pachi doesn't even know what's a seki and it will suicide if you give it a final position where it's in seki.
As of now we don't have a program that tells you who wins with 100% certainty in a final position, unlike chess where the rules are, IMO, much easier to learn and understand.

I'm ranked 4 kyu in KGS (slightly below the average player) and I don't even know how to count in the game of go (I once tried to understand bent 4, super ko and stuff like that that's required for one to say "I know the rules" but I failed).
This is, exactly, the reason that I have never written a GO program. The first step for my to code a new game AI is for me to understand the rules in deterministic complete detail. I kept running into things like "the experienced player will know what the correct rules are for this sort of situation, but the 2008 meeting of the Japanese council of rule tweakers has some important updates on it.
I want simple, clear rules for my games, real life provides all the messy that I have any need for.
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: michi

Post by lucasart »

Japanese rules are obscure. Use Chinese rules instead.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
kbhearn
Posts: 411
Joined: Thu Dec 30, 2010 4:48 am

Re: michi

Post by kbhearn »

Isaac wrote:
zamar wrote:
Isaac wrote: In my opinion the rules of the game of Go are extremely complex, in particular the counting part. There are many rules for counting (Japanese rules, Chinese rules, etc.) and I don't think they are easy at all. Most go programs aren't programmed to count with Japanese rules for instance (or when they do, they have bugs that makes them lose in the end, that happens for Zen for example).
Even pachi doesn't even know what's a seki and it will suicide if you give it a final position where it's in seki.
As of now we don't have a program that tells you who wins with 100% certainty in a final position, unlike chess where the rules are, IMO, much easier to learn and understand.

I'm ranked 4 kyu in KGS (slightly below the average player) and I don't even know how to count in the game of go (I once tried to understand bent 4, super ko and stuff like that that's required for one to say "I know the rules" but I failed).
1) Have you heard of "the logical rules of go"?
- http://tromp.github.io/go.html
These are extremely close to Chinese rules

2) Superko = Don't repeat the previous position. (Positional superko = Only the position matters. Situational superko = Position + side_to_move matters)

3) I agree that counting for a human during the game is difficult (My kgs top rank is 3 kyu, but nowadays I rarely play at all, so my current rank is around 5-6 kyu), but for a program it's straightforward.
1)No, I haven't. Interesting, I didn't know. Are those rules what programs are usually using?
2)I'm not understanding the difference(s) between a super ko and ko, but I could fix this by searching on the web.
3)I don't know how to count in the game of go at all. If it wasn't for the automatic counting at the end, I would be lost. I basically play with intuition only and I have no idea whatsoever in terms of points how good/bad moves are.


Also I don't know the details of bent 4 (nor what it is) and how Chinese and Japanese rules deal with it. I don't think these concepts are easy to grasp for people new to the game.
Overall my point is that chess rules are simpler to learn and understand than go rules even though they may appear somewhat arbitrary (for instance the en passant rule or the fact that pawns may move 2 squares ahead for their first move).
The rules are very straight-forward. It's the consequences of the rules that are complicated.

The primary complication in counting (which in theory is simple) is essentially just a sequence of Life-Or-Death problems. Once it's established which stones are alive, counting is trivial - remove the dead stones (take as prisoners if japanese), and under chinese scoring you count all alive stones and territory they surround for each side, no prisoner count. Under japanese scoring count only the territory surrounded and add it to the prisoner count.

Bent 4 is a specific eye configuration in the corner of the board that is dead without a ko threat. Under chinese scoring you would simply prove the configuration is dead by making the moves if it were disputed, no need for any special rulings.

In general this is why chinese scoring is simpler, any dispute over the final score can be resolved by playing it out. If you're right, no points are ever lost by playing more stones to prove it.

Under japanese scoring such disputes have to be resolved by taking a snapshot of the end position, playing it out to resolve the life-or-death (i believe with some added restrictions that make cases like bent 4 always dead not dead-if-no-ko-threat), then returning to the original end position and removing the now-declared-dead stones as prisoners. Hence 'bent 4 is dead' is a rule to speed up counting disputes by covering one common configuration.

So to make a go program do final counting accurately the core need is a life-or-death solver.

The chinese version is simply a matter of : if side A wanted to take side B's specific chain is there any sequence of moves that can bring that about. B can pass as needed in said sequence but A must always make a move until it's proven it can take it. If it can't prove it, the chain is alive.

The japanese version would have to observe japanese counting rules for determining final life and death (which i believe essentially boils down to only moves local to the chain by either side - but i'm not sure tbh).
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: michi

Post by BBauer »

I compiled michi in windows and the exe seamed to work.
michi benchmark gave some lines and ended with 17.5000
Because it said:
Warning: michi cannot load pattern files, It will be much weaker.
I installed patterns.prob and patterns.spat.
Now running michi benchmark gave no reply. It just runs.

Anything I can do?
Kind regards
Bernhard
PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: michi

Post by PK »

there is a similar problem with michi-c: MSVC compile loads the pattern files basically forever.

I don't know how the program will behave with them, but without them it makes a lot of questionable moves on 1st/2nd line. probably some adjustement of priors would be needed.

The easiest way to improve michi seems to add many more 3x3 patterns and assign them variable priors.

Also, a rule like "don't consider 1st/2nd line moves if there are no stones with the manhattan distance of 5 to the intersection in question" might help.
zamar
Posts: 613
Joined: Sun Jan 18, 2009 7:03 am

Re: michi

Post by zamar »

Isaac wrote: 1)No, I haven't. Interesting, I didn't know. Are those rules what programs are usually using?
If you mean program vs. program matches, then yes, logical rules are sufficient.

If you want to create a program that plays against humans, then humans will expect that program determines life/death status of stones at the end of the game. It could be played out, but humans don't enjoy playing 50-100 obvious moves at the end of the game.
2)I'm not understanding the difference(s) between a super ko and ko, but I could fix this by searching on the web.
Ko = Don't repeat previous position (in chess terms: position exactly 2 plies ago!)
Super ko = Don't repeat any previous position (in chess terms: any position >=2 plies ago!)
Joona Kiiski