Go in Games Lobby is sucky

YHWHover 9 years ago

Hi -- Go in Games Lobby works pretty well for the most part (there are 3 board sizes, capturing works correctly) but there are 2 areas of the game that can use improvement

These improvements would encourage more people to play it, and it's more casual than chess, very zen all around, please skim this topic and weigh it over

Starting the game

For starting the game, 2 things should be added:

  • the option to have the other player go first / random player go first
  • the option for handicap [ wiki ]
    • Handicap should be a dropdown box between 0 and 9 (default 0), where the handicap amount of stones are set, for black, in the traditional corresponding handicap locations (marked as black dots near the corners / in the center)

Ending the game

There are 2 things that should be added to ending the game:

  • Players passing 3 times in a row traditionally ends the game
    • To accommodate the Go-naive of EM, this could be made 4 passes in a row with no ill-effects
    • A "Propose end" / "resign" option could serve the same effect
  • Scoring also includes the number of areas a player controls on the board

The second point is the hardest to program of all my suggestions, but it is also the most important: sacrificing 4 or 5 of your own pieces is worth it if you end up controlling more territory on the board.

While area management is less important on smaller board sizes (9x9 / 13x13) it is arguable a vital aspect of the game. The name 围棋 literally means "encircling game". Just like how chess is not about killing all of your enemies pawns or power pieces, but about checkmate, Go is not about clearing the board of your enemy's forces, but controlling the board. That's precisely why the game is so complex and can have so many different forms of mind games.

It might be a bit tricky to add the algo for scoring area control, but fortunately Go is essentially a 2D array of black/white/null values. I know you're a busy guy driving people around at Uber or whatever but guess what? Scoring territory is actually a very basic algorithm.

I would recommend using 0 for unset-owned territories, 1 for black, 2 for white, 3 for shared / noncontrolled.

  1. Start with in [0][0] (of [8][8], [12][12], or [18][18] of the piece talleys once the game has ended.
  2. Create a new object/dict/whatever for "controlled territories"
  3. If the piece is null, store it as null; otherwise, assign the territory to the color of the occupying piece.
  4. Proceed horizontally; increment a counter from 0 until another non-null piece is reached.
  5. If the ending piece is the same color, record the counter in the territory object with the relevant coordinates. If the ending piece is the enemy's color, mark the territory as a 3rd party controlled zone.
    • If the initial condition was null, or the limit is reached, then type the controlled territory as the other non-null value. This allows players to control sides or corners.
  6. Follow the columns, repeating the same process, marking a territory as white/black/neutrally owned territory. If a black territory terminates with a white piece, for instance, then the whole territory should be declared unowned.
  7. Add the collected points-per-area to the corresponding color's totals

It looks like someone's coded similar scoring algorithms in JS -- you can be super lazy here and copy their code even

&

  • Python example
  • C example
    • This uses a different logic, which may be easier to implement, depending on how piece capturing works in EM go

LUCID LUCID LUCID LUCID LUCID LUCID LUCID LUCID there is absolutely no reason to play "capture go" on 13x13 or 19x19 boards! Even on 9x9 boards, a more complex scoring system makes the game much better

AtheneWinsover 9 years ago
this is real meta