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.

  1. Bulba
    Offline

    Bulba Skelegon Retired Staff

    1,059
    1,035
    433
    Dec 11, 2014
    Male
    Singapore
    5:05 AM
    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
  2. Chows
    Offline

    Chows Slime

    15
    25
    25
    Feb 12, 2015
    Male
    11:05 AM
    Thank you for taking the time in making this, I couldn't have explained it anywhere near as well as this.
    Hopefully they fix these errors, as a huge omok lover I LOVE this feature to the server.
     
    • Like Like x 1
  3. vuz
    Offline

    vuz Red Snail

    5
    1
    16
    May 12, 2015
    Male
    2:05 PM
    There's also another bug where if you put down a piece below the 1 second mark (~0.5 second time window) you get another turn.
     
    • Like Like x 1
  4. ZeroTrois
    Offline

    ZeroTrois Red Snail

    5
    1
    16
    Apr 16, 2015
    Male
    5:05 AM
    Just as Bulba noted that, the black has definite advantage in free-gomoku games.
    In order to solve this unfairness, there are two kinds of rules adapted to solve this problem.

    The first is Gomoku: The fairness is achieved by giving the white a chance to "swap" - they can chose to become black if the previously black has used too advantageous openings.
    The second is Renju: The fairness is achieved by restricting the moves of black. Some of the Renju rules also include some kind of swapping.

    Therefore, I think the Omok in GMS is more closed to Renju in form.
    In Renju games, all black 3x3 (and 4x4, but apparently GMS didn't adapt this one) moves and overline moves are not allowed even if that move is forced.
    (Also, the white are allowed to win with both 3x3 and overlines, but I noted that it is not possible in MapleLegends. The rules are adapted in order to decrease the advantage holding black. It doesn't make any sense if white is also restricted in moves.)

    This gives the white a specific strategy to win. They make a game where the only move for black to prevent white from winning is to make a forbidden move.
    Since they are not allowed to do so, the white wins.

    I suggest that we should at least allow whites to do 3x3 moves (and win with overline, but this situation occurs far less), else the black is actually holding tremendous advantage in MapleLegend Omok games.
     
  5. npfenix1
    Offline

    npfenix1 Brown Teddy

    61
    181
    75
    May 18, 2015
    Male
    Under the bridge.
    12:05 AM
    *LURKING*
    Marauder
    That was a good read. Thanks bulba!

    Graphs helped me out a lot trying to figure out your points you wanted to make.
    They were really nicely done too :p

    I'm pretty new to the whole context but I love playing omok.
    I have realized that sometimes you're really stuck only defending when going second.
    It usually means your demise when you try to make semi-aggressive attack from that spot.

    But I'm pretty newb to it so I can't really say anything with confidence backing it up.
    Just my 2 cents.
     
  6. Kargo
    Offline

    Kargo Skelegon

    941
    659
    413
    Mar 5, 2015
    Male
    Holland
    11:05 PM
    Kargo
    Shadower
    138
    Flow
    Need this for the tournament LOL
     
  7. Healer
    Offline

    Healer Windraider

    499
    1,498
    327
    Apr 26, 2015
    Male
    12:05 AM
    69

Share This Page