1. Hello!

    First of all, welcome to MapleLegends! You are currently viewing the forums as a guest, so you can only view the first post of every topic. We highly recommend registering so you can be part of our community.

    By registering to our forums you can introduce yourself and make your first friends, talk in the shoutbox, contribute, and much more!

    This process only takes a few minutes and you can always decide to lurk even after!

    - MapleLegends Administration-
  2. Experiencing disconnecting after inserting your login info? Make sure you are on the latest MapleLegends version. The current latest version is found by clicking here.
    Dismiss Notice

Omok bugs

Discussion in 'Closed/Resolved' started by Bulba, Dec 13, 2014.

Thread Status:
You must be a logged-in, registered member of this site to view further posts in this thread.
  1. Bulba
    Offline

    Bulba Skelegon Retired Staff

    1,058
    1,035
    433
    Dec 11, 2014
    Male
    Singapore
    5:38 PM
    Update 1: Added input from Pebbs, a long-time pro omok player in EMS.

    Update 2: Added section for other bugs at bottom of post.


    While we are talking about fixing minigames, here is a related improvement thread: http://forum.maplelegends.com/index.php?threads/minigame-point-system-improvements.2604/

    ==============================

    I've noticed the rules in omok seem to be working partially incorrectly. It can get quite confusing, hence I'm writing this in an attempt to clearly explain the precise rules of omok and how they should work.

    For you TL;DR peeps, here's your cheat sheet:

    3x3 rule: You cannot place a seed in a position that forms two (or more) simultaneous open row of three seeds, unless this move is forced. (Forced means a move that must be placed at a particular spot in the current turn to prevent an immediate win by the opponent in the following turn. Such a move cannot be prevented by this rule. See main post for example.)

    This is an open row of 4:
    http://i1242.***/albums/gg536/Hamsterland/OMOK1_zpsdae527f9.png

    An open row of 3 is a row which, when one more seed (of the same colour) is placed, will form an open row of 4.

    In other words,

    An open row of 3 can be formed by taking an open row of 4 and removing one seed from it.

    This rule is ignored if the move that violates this rule is required to block a row of 4 consecutive opponent seeds.

    Current problem

    http://i1242.***/albums/gg536/Hamsterland/OMOK8_zps0ad1081a.png

    Positions that should be blocked (shown in red) are allowed.
    Positions that should be allowed (shown in green) are blocked.



    WARNING: Wall of text up ahead. Hope you've had your coffee.



    What is Omok?

    Omok, more commonly known as Gobang or Gomoku (in Korean and Japanese I think), is a game where players alternately place seeds on a 15x15 board with the aim of lining up 5 seeds in a row to win the game.

    Outside of MS, Omok is played with black and white seeds, where black goes first. Without any extra rules, the black player is said to hold a huge advantage because he has the first move, and computer analysis has shown that with pefect play, black cannot lose (he should either win or end in a draw). Hence, extra rules have been added to Omok to reduce the advantage of black. There are many variations of Omok which uses different sets of rules, and some rules are more complicated than others. In order to even the playing field while still keeping the game relatively simple, GMS implemented the following 2 rules:

    1. Overline rule: You cannot win with a line of 6 or more pieces, it must be exactly 5 in a row, with empty spaces or opponent's seeds at either end.

    2. 3x3 rule: You cannot place a seed in a position that forms two (or more) simultaneous open row of three seeds, unless this move is forced.


    Rule #1 works fine, #2 is the one that is incorrectly implemented, and is arguably the more important rule of the two.

    In order to explain how the rule works, you first need to know these definitions:



    Open row of 4

    An open row of 4 is a row of 4 consecutive seeds with open spaces at either end. When a player forms such a row, he can go on and win the game since the opponent has to block 2 positions to prevent a win but can only place 1 seed on the next turn.

    [Note: You'll notice that the usage of the word "row" does not necessarily mean consecutive positioning. It simply means seeds on the same line (row, column, or diagonal).]

    http://i1242.***/albums/gg536/Hamsterland/OMOK1_zpsdae527f9.png

    Holy cow if you see this you can find a nice comfy corner to cry in cuz YOU JUST LOST THE GAME. That is provided your opponent does not have the mental capacity of a baboon. No matter where X places his seed, O can be placed on the other side to win.

    http://i1242.***/albums/gg536/Hamsterland/OMOK2_zps94da8c83.png

    If your opponent starts celebrating at this point, be sure to smirk and yell "OH YEAH?" before dramatically slamming down a seed at just one position to prevent them from winning in the next turn.



    Open row of 3

    This is what the 3x3 rule is concerned with.

    An open row of 3 is a row which, when one more seed (of the same colour) is placed, will form an open row of 4.

    In other words,

    An open row of 3 can be formed by taking an open row of 4 and removing one seed from it.

    As such,

    http://i1242.***/albums/gg536/Hamsterland/OMOK3_zpseeda6f22.png

    One more O seed placed at the correct spot will form an open row of 4.

    http://i1242.***/albums/gg536/Hamsterland/OMOK4_zpsad5101d4.png

    One more O seed does not form an open row of 4.



    3x3 rule

    And so, the 3x3 rules prevents a player from placing a seed in a position that would form two of such open rows of 3 simultaneously.

    Why this rule? If you formed 2 simultaneous rows of 3, your opponent can only block one of the rows on his next turn, which leaves you free to form an open row of 4 on your next turn, which means you can then become a Pokémon master pass your exams win the game. Going first, black can easily form strong attacks by forming open rows of 3 early, while white has to busy himself defending such attacks. Black has an easier time forming 2 simultaneous rows of 3 after continuous attacks (which would lead to his win), hence this rule aims to reduce the possibilities of black winning early.

    http://i1242.***/albums/gg536/Hamsterland/OMOK5_zps7495e302.png

    The 3x3 rule should prevent O from putting his next seed at the positions marked in red.

    These are some cases where you can win with
    http://i1242.***/albums/gg536/Hamsterland/OMOK6_zps297a6b18.png

    Forming open row of 3 together with row of 4, or two rows of 4. These moves are still legal even if the X seeds were removed. I only placed them there for practicality; if you had an open row of 4, that alone would allow you to win, you wouldn't have any need to simultaneously form another open row of 3 or 4, though the rules would still allow that.

    These are some cases where you don't win instantly, but are still allowed
    http://i1242.***/albums/gg536/Hamsterland/OMOK7_zps4549f916.png

    Placing an O seed at the green spots do not violate the 3x3 rule. One of the rows of 3 formed is not 'open'.

    Exceptions to the 3x3 rule
    http://i1242.***/albums/gg536/Hamsterland/OMOK9_zps745d89f4.png

    The only time where the 3x3 rule is ignored is when the violating move is forced, i.e. blocking a row of 4 (not necessarily consecutive row of 4, any row of 4 that allows an immediate win on the next turn if there was no interference). If a move that blocks an immediate win happens to form 2 or more simultaneous open rows of 3, it will be allowed.



    Problems with the current implementation

    Currently, I noted two problems with the 3x3 rule in-game:

    1. "Rows of 3" were only defined as consecutive rows of 3 seeds. As such, you could still form 2 open rows of 3 simultaneously as long as the rows of 3 were not the consecutive type (and go on to win the game).
    2. "Open" rows were not checked for. Moves that would form 2 consecutive rows of 3 seeds, regardless of them being open or closed, were blocked.

    http://i1242.***/albums/gg536/Hamsterland/OMOK8_zps0ad1081a.png

    Positions that should be blocked (shown in red) are allowed.
    Positions that should be allowed (shown in green) are blocked.



    More examples

    Red means an invalid move, green means valid. Orange are intermediate moves.

    http://i1242.***/albums/gg536/Hamsterland/OMOK1_zps2effb416.png
    Simple example of 3x3 rule violation.

    http://i1242.***/albums/gg536/Hamsterland/OMOK3_zpsf0120401.png
    Nothing wrong with this move at all.

    http://i1242.***/albums/gg536/Hamsterland/Untitled_zpsd9c9a34f.png
    Start from the position on the left, X to move. After 1 turn (1 move by X, 1 move by O), the right-most position wins for X, the middle one doesn't. Order of moves make a difference here due to the 3x3 rule.



    Useful links

    Wikipedia on Omok and its variations and rules: http://en.wikipedia.org/wiki/Gomoku
    GMS post explaining the rules (with pretty pictures and GIFs): http://bellocan.com/viewtopic.php?f=32&t=159
    MSEA post touching on rules slightly: http://maplesecrets.blogspot.sg/2011/08/guide-to-omok-maplestory-omok-guide.html



    If you have any questions, need any clarification, or have your own scenarios that you are unsure of, feel free to post them :)



    Update 1:

    Pebbs noted that in EMS, you were only blocked from forming multiple 3x3 consecutive rows. Multiple 3x3 rows of which not more than 1 is consecutive are allowed.

    However, my source links above states otherwise (2 or more purely non-consecutive 3x3 rows are disallowed). I can only conclude that different versions may have had slightly different rules.

    My sources also has no data on forming two 3x3 rows, one of which is consecutive, and the other disjoint, but Pebbs says that in EMS it was allowed. Again, there may be discrepancies in the rulings based on server.

    My guide above was written based off the definition of the terms and rules, and it makes sense to me that way. But GMS might have had different rules, and other regional servers may have been different from GMS.

    So the decision for which part of the rules to implement is now left up to the admins to decide. Pebbs feels that following my guide exactly may be a bit strict and make it a bit hard for players to win. You may choose to relax one portion of the rules such as allowing multiple 3x3 rows as long as the rows formed are not of the same type (consecutive or disjoint; this means you will be allowed to form 2 rows, one consecutive and one disjoint), or further rules to make it even more easier to win (though I would not recommend any more than this).

    Other Omok bugs:

    1. Undo doesn't function correctly 100%, sometimes it removes opponent's pieces as well.

    2. There is an exploit where if you make a move while the timer is under 1 second, your opponent's turn gets skipped. (reported by: vuz)
     
    Last edited: May 29, 2015
    • Like Like x 3
Thread Status:
You must be a logged-in, registered member of this site to view further posts in this thread.

Share This Page