The Second Go Battle Royale ⚔

I will post the mapping in the first post no matter what the outcome of the vote.

I don’t think I have the time to do that…

I also sadly don’t think I should start another forum game at this moment, I’m being pretty busy lately.

3 Likes

Understood on both points. Time is the most limited resource.

1 Like

I may try to implement it in the case it is admissible (e.g. the project is open source).

4 Likes

It is open-source: vsotvep.github.io/MulticolorGo.html at master · Vsotvep/vsotvep.github.io · GitHub

Only one spot left!

  • NeilAgg
  • ArsenLapin1
  • yebellz
  • martin3141
  • antonTobi
  • sokoslav
2 Likes

Well, it’s open source, but I’m terrible at github, so no promises that I can manage to merge or pull or request or whatever it’s all called :slight_smile:

Feel free to give it a go and guide me through the steps I should take to update it.

2 Likes

i’ll join.

like sokoslav, the strict 48 hr time limit is a bit daunting but i should be able to communicate any delay ahead of time like a weekend away.

2 Likes

Thank you for joining, we now have 7 players. Let’s start this thing!
@ArsenLapin1 please generate a board with 3 starting moves for 7 players and post it.
I will randomly assign players to the colors after that.
Looking at the poll, there have been 6 votes and 67% are for using the ordering on the board. One vote won’t change the result so we will use that ordering.

I think I may have stated the time constraint a bit too strongly. This is supposed to be fun and not pressure anyone. I don’t want the situation like the other game where weeks go by without a move. The game will accommodate people’s schedules – this is definitely lower priority than real life.

2 Likes

“The probability that the constraints are violated is way too high”
to do rejection sampling manually, but
between 149/150 and 199/200
is fine for doing it by computer.

I don’t know the syntax for vsotvep’s board, but otherwise

from random import sample,shuffle

gridpoints = tuple((x,y) for x in range(13) for y in range(13))

def generate_stone_placement_(maxtries):
	for _ in range(maxtries):
		curtry = sample(gridpoints,21)
		if all(1 < abs(w-y)+abs(x-z) for i,(w,x) in enumerate(curtry) for (y,z) in curtry[:i]):
			break
	else:
		print('FAILED')
		return
	stones = list(curtry)
	shuffle(stones)
	alphabet = 'bcdefghijklmn'
	print(' , '.join(','.join(alphabet[x]+str(y+2) for (x,y) in stones[i:i+3]) for i in range(0,21,3)))

generate_stone_placement_(10**5)

works fine, since on my laptop, even a million tries takes roughly 20 seconds.

https://vsotvep.github.io/MulticolorGo.html?bs=15&st=cchhehbmhkgdeidggdgkiffimmibjfmjffbfnicngcnncjleflebbeidgedgdeg

Screenshot from 2022-05-25 09-49-04

5 Likes

A bit off-topic: I have written a piece of code that generates 21 non-adjacent intersections, then clusters them into groups of 3 and to generate a “pacificist” board where stones of the same colour are grouped.

This is not meant to be used during this game, but it might be useful for future games.

Summary

The following code has produced this url: https://vsotvep.github.io/MulticolorGo.html?bs=15&st=mldnmdlkdecgdggbbglbcmecmccdkhbjhflhgciicifdihmfknfenfmjeghekje

Short explanation of the code: first we generate 21 random non-adjacent points. Then we use k-means algorithm from scikit-learn, to build 7 clusters of stones, and get the coordinates of the center of each cluster. However, these clusters might be unequal in size (due to the way k-means work, a cluster might have 4 or 5 stones while another cluster might have only 1 or 2 stones). Then, we use the linear assignment optimisation algorithm from scipy to assign exactly 3 stones to each center. Finally I reused function prettify from before, to generate a url for vsotvep’s multicolour go.

from itertools import product
from random import choice, shuffle
from sklearn.cluster import KMeans
from numpy import repeat
from scipy.optimize import linear_sum_assignment
from scipy.spatial import distance_matrix

def random_nonadjacent_points(n_points, board_size):
    intersections = set(product(range(board_size), repeat=2))
    result = []
    for _ in range(n_points):
        x, y = choice(tuple(intersections))
        for xy in ((x, y), (x+1, y), (x-1, y), (x, y+1), (x, y-1)):
            intersections.discard(xy)
        result.append((x,y))
    return result

def make_clusters(points, n_clusters):
    n_per_cluster = len(points) // n_clusters
    assert(len(points) == n_per_cluster * n_clusters)
    kmeans = KMeans(n_clusters=n_clusters).fit(points)
    centers = repeat(kmeans.cluster_centers_, n_per_cluster, axis=0)
    cost_matrix = distance_matrix(points, centers)
    points_idx, colours_idx = linear_sum_assignment(cost_matrix)
    d = {}
    for i, c in zip(points_idx, colours_idx):
        d.setdefault(c // n_per_cluster, []).append(points[i])
    return d

def prettify(d):
    baseurl = 'https://vsotvep.github.io/MulticolorGo.html?bs=15&st='
    colours = 'cdefghi'
    alphabet = 'bcdefghijklmn'
    return baseurl + ''.join(alphabet[x]+alphabet[y]+colours[c] for c,l in d.items() for x,y in l)

def main():
    n_players = 7
    board_size = 15
    points = random_nonadjacent_points(3 * n_players, board_size - 2)
    d = make_clusters(points, n_players)
    url = prettify(d)
    print(url)

if __name__=='__main__':
    main()
4 Likes

I have posted the assignment of players to colors in the first post. In case it helps, here is a copy:
Red: @antonTobi
Yellow: @NeilAgg
Blue: @martin3141
Green: @yebellz
Pink: @mafidufa
Cerulean: @ArsenLapin1
Orange: @sokoslav

Let the negotiations begin and have fun everyone!

On an administrative note, I am going out of town from early tomorrow morning through the weekend for a wedding so I might have limited time over the next few days.

3 Likes

The Cerulean Kingdom would like to open negociations with our dearest Pink and Blue neighbours, especially regarding the future of the prized but unstable Northwest Region.

3 Likes
Off-topic response to @ArsenLapin1

I agree the current setup might be “too random”, but this encourages players to keep to a pre-defined region. I was hoping to break that up. We might have to try to find some kind of solution in between.

From the desk of the Esteemed Leader of the Great Golden Empire:
We have found ourselves in a somewhat precarious position. We are stuck in no-mans land. We need to forge alliances to ensure our survival.

To the great leaders of the Orange Empire @sokoslav and the Green Empire @yebellz :
We find ourselves interlinked and dependent on each other. Perhaps a cooperation can be achieved?

1 Like

By “interlinked” I assume you mean “the Golden Empire is currently tearing apart the orange great-grand-ogeima F10-G5”.

Dear Blue friend,

Our Ambassador at C13 is looking forward to cooperating with you to achieve mutual life in the Northwest corner. Please let us know of any plans that your brave explorer at B14 has for this region.
We believe our efforts in the Northwest corner could be a stepping stone in forging a durable and fruitful relationship. A second step could be the peaceful-but-fair sharing of the South regions. While your sanken-tobi F4-K4 suffers from some pressure applied by Orange, we’d be happy to set-up an amicable border between our Cerulean Southwest corner and your Blue South side, close to the E or F file.

2 Likes

Dearest Pink @mafidufa
Please let us know of any plans that you may have in proximity to our armies, especially as they may concern our reconnaissance team at H11.

Have a nice game everybody!

I play O3:
image

@sokoslav (orange) My current intention is not to attack N3, I’m simply moving towards connecting to my other stones. I think eventually it could be beneificial for both of us to have some shared eye-space around N2.

@yebellz (green) I would appreciate if you did not play O6. If you grant me this favor, I will be happy to collaborate in the surrounding area, and do what I can to help N6 survive (for instance building a shared eye on N7 in the future).

Next to move is @NeilAgg (yellow).

Here’s some tips on creating the screenshot+link that may be helpful to someone:

  • On windows, Win+Shift+S lets you select a region of the screen to screenshot. You can then immediately paste the image with Ctrl+V into your forum post (no need to save the file).
  • In Vsotvep’s tool, you need to press the “link” button for the URL to update after you’ve made your move.
  • If you select the image part of your post (looks something like ![image|526x500](upload://8zKo6G4LHgotDqiEejl3niowzQa.png)) before pasting the board URL, the image will become a clickable link.
4 Likes

That unfortunate circumstance could not be helped, we are hoping @sokoslav will see the benefit of an ally instead of an enemy.

1 Like

:+1:

I hope you did not take any pressure to make your first move quickly. As I stated before, we are going to give some extra time right now for people to negotiate.

That is very helpful, thank you!