Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thue–Morse sequence #43

Open
HeorhiiSher opened this issue Sep 25, 2020 · 3 comments
Open

Thue–Morse sequence #43

HeorhiiSher opened this issue Sep 25, 2020 · 3 comments
Labels
enhancement New feature or request modifier

Comments

@HeorhiiSher
Copy link

A sequence of moves which makes the game fair and makes the komi unnecessary.

@sigs
Copy link

sigs commented Dec 18, 2020

What's the suggested feature here?

@JaniM JaniM added enhancement New feature or request modifier labels Dec 22, 2020
@shinuito
Copy link

What's the suggested feature here?

I believe the suggestion is that the move order should follow the thue-morse sequence BWWB WBBW WBBW BWWB....
as per eg https://en.wikipedia.org/wiki/Thue%E2%80%93Morse_sequence

Not that this is first place people have tried it or anything, but there was a good amount of discussion on the OGS forums
https://forums.online-go.com/t/thue-morse-fair-sharing-sequence-a-possible-alternative-to-komi/22547?u=shinuito

I also made a mini list of some games that were played on OGS. It's not up to date I don't think since they played a tournament even in the thue-morse group that wasn't added.

https://forums.online-go.com/t/thue-morse-go-games-list/27590?u=shinuito

They can give you an idea of what a game looks like with all the double moves. Of course since the server isn't set up for such a sequence a lot of passing was needed to allow all the double moves that come up.

@shinuito
Copy link

So if one wants to implement this variant, the only difference is just who's turn it is to move is different to usual.

It won't go Black White Black White....

Instead it will go BWWB WBBW WBBW BWWB... as mentioned above.

Wikipedia has some suggestions for computing who's turn it is on the fly

"This method leads to a fast method for computing the Thue–Morse sequence: start with t_0 = 0, and then, for each n, find the highest-order bit in the binary representation of n that is different from the same bit in the representation of n − 1. (This bit can be isolated by letting x be the bitwise exclusive or of n and n − 1, shifting x right by one bit, and computing the exclusive or of this shifted value with x.) If this bit is at an even index, t_n differs from t_n − 1, and otherwise it is the same as t_n − 1."

The other method is just to take the (turn number-1) in binary and compute the bitsum modulo two.

I guess if move 1 is Black then 0=000 with sum =0 so let Black=0 and White =1.

B (=000 ->0)
W (=001 ->1)
W (=010 ->1)
B (=011 ->0)
B (=100 ->1)
W (=101 ->0)
... etc

I don't know Rust though, and I've no idea where in the code the game turn is incremented for example or where that's converted into a color either.

It feels like it could just be adding an extra if statement for some is_thuemorse and then the extra presentation + checkboxes to select it in the game rules?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request modifier
Projects
None yet
Development

No branches or pull requests

4 participants