diff --git a/pettingzoo/classic/chess/chess.py b/pettingzoo/classic/chess/chess.py index f1e6df669..378eef0b4 100644 --- a/pettingzoo/classic/chess/chess.py +++ b/pettingzoo/classic/chess/chess.py @@ -71,11 +71,13 @@ You can get back the original (x,y,c) coordinates from the integer action `a` with the following expression: `(a // (8*73), (a // 73) % 8, a % (8*73) % 73)` -> x = 6 -> y = 0 -> c = 12 -> a = x*(8*73) + y*73 + c -> print(a // (8*73), a % (8*73) // 73, a % (8*73) % 73) # -> 6 0 12 +Example: + >>> x = 6 + >>> y = 0 + >>> c = 12 + >>> a = x*(8*73) + y*73 + c + >>> print(a // (8*73), a % (8*73) // 73, a % (8*73) % 73) + 6 0 12 Note: the coordinates (6, 0, 12) correspond to column 6, row 0, plane 12. In chess notation, this would signify square G1: