Ludii Forum
Wrong start setting for Reversi - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Game Problems (https://ludii.games/forums/forumdisplay.php?fid=17)
+--- Thread: Wrong start setting for Reversi (/showthread.php?tid=47)



Wrong start setting for Reversi - Wolfgang Konen - 04-08-2020

Reversi: In your definition of Reversi you do not have the standard start setting. As https://en.wikipedia.org/wiki/Reversi says:
“Convention has initial board position such that the disks with dark side up are to the north-east and south-west. The dark player moves first.”
Your setting is the same for the start board, but the white player moves first.
I suggest below a slightly modified Reversi.lud where the black player moves first.
This makes it easier to compare to other agents which were perhaps trained with the standard setting.


Another tiny thing: Many people may search for Reversi under the name Othello. Perhaps you could add alternative game names with which one could search for games.

The following is just a copy of your Reversi definition with state numbers switched in the two "fill" statements:

(game "Reversi" 
  (players 2) 
  (equipment {
    (reversiBoard 8)
(Piece "Disc" None)
  }
  ) 
  (rules
  (start
    {
    (fill "Disc0" {28 35} state:2)
    (fill "Disc0" {27 36} state:1)
    }
  )
   
    (play
        (bySite
            (setVar "current" (from))
        (empty)
        (concatenate
        (custodial
  of: (isEnemy (state (to)))
  by: (isFriend (state (step)))
  effect: (crossProduct (to (indexOf "Disc0") state: (mover) site: (var "current")) (flip) )
    )
  (then
    (setScore
    {P1 P2}
    {(size (sitesOfState 1)) (size (sitesOfState 2))}
    )
  )
    )
    )
    )

    (byScore (or (allPass) (stalemated Next)))
  )
)

(metadata
  { "rules" "Trap other pieces between your own to capture them, but be aware that the opponent may do the same.
Pieces will change sides (colors) dozens of times. The winner is the one with the most pieces when no more pieces can be played on the board."}
{"getColourFromLocalState" "true"}
  { "Source" "https://en.wikipedia.org/wiki/Reversi"}

{"Features" "rel:to=<{}>:pat=<refl=true,rots=all,els=[-{}]> 0.0;
rel:to=<{}>:pat=<refl=true,rots=all,els=[-{}, #{0.0}, #{0.25}]>:comment=\"Play in corner of board.\" 5.0;
rel:to=<{}>:pat=<refl=true,rots=all,els=[-{}, !#{0.0}, #{0.0, 0.0}, #{0.25, 0.0}, -{0.25, -0.25}]>:comment=\"Dont play around empty corner of board.\" -2.0;
rel:to=<{}>:pat=<refl=true,rots=all,els=[-{}, #{0.0}, -{0.25}, !#{-0.25}, #{0.25, 0.0}]>:comment=\"Dont play around empty corner of board.\" -2.0"}
)


RE: Wrong start setting for Reversi - Eric Piette - 04-11-2020

Ok, you are right, in order to follow the convention we will switch black and white in Reversi.
And yes as you said in your message, you have the ability to modify yourself our lud files if you need any modification like another starting positions for example. In the release version, we will provide an editor to modify easily any game description directly in Ludii.

Concerning the alias "Othello" for Reversi, yes we also have a such mechanism in our current dev version already working. It will be present in the next pre-release version and naturally also in the release version.

Thanks a lot for your contribution Smile


RE: Wrong start setting for Reversi - DennisSoemers - 04-19-2020

These changes have been included in the latest 0.7.0 pre-release. The first player is now black by default, and Reversi will show up when searching for Othello in the game loader (many other games also have aliases by which they can be searched).