webSearch | my variantschallengesother places

New ideas for Zillions

 

Here are a bunch of suggestions for an update of the ZRF language. Letīs shoot in all directions, in order to hit something! Just one note: we know very well that it is easier to propose things than to make them! I want to thank ZoG team for such a great game!!!

Comments for blocks, like the /* */ comments in C

(last-player?    player)
(actual-player? player)
(next-player?   player)

      true if the last/actual/next player is <player>

(piece-of-player? player [position|direction]) 

      true if the piece is of <player>

<any-piece> declaration for win/loss-conditions

Real global flags for the entire game (boolean and position data type). E.g.,

     (set-global var_name bool_value)
     (set-global var_name position-name)

    with a place in the (game ) block for initialization

     e.g.

      (game ...
            ... (set-global var_name bool_value) ...
      )           

    This is ideal for many things, e.g, for programming KO rules
    (you can save the tabu square to compare later).

    Also, with position variables, there can be instructions like,

     (send-piece position1 position2)

    to send a piece from one position to another, in a more direct way.

Just a side thought: Itīs a known result of Theory of Computation  that if you have a programming language with iteration, conditional  and global memory, you have Turing Equivalence (that is, you can  make everything that is computable), at least up to the available memory.

Iīm not sure if the ZoG memory system satisfies the requirements  for Turing Equivalence. This may mean that certain board games  cannot be implemented, even with hard and/or unelegant work.  And thatīs nasty, because itīs impossible to have a procedure  to decide if a game (defined by an algorithm) is programmable  or not.

The option of a piece moved by other player, to be able to use  the playerīs symmetries only in that move turn, Nice to handle neutral pieces that act differently depending of who is moving them (eg. the Holes in Amoeba). E.g.,

    (piece ...
       (user-symmetry true) ...
    )

Multiple Mark/Back mechanism, using a Stack and/or a Queue

ForEach instruction, a loop process for iterate elements in a set

    e.g.,

    (foreach (<square> in <some-zone>)
       ; stuff using <square>
    )

    With this instruction, there may have some set generators, for e.g.,

     - (found-pieces (<player> <piece>) (...) ... )
   - (found-pieces (<player> any-piece) )
   - (found-pieces (any-player any-piece) )
        ...

       returns the squares where these pieces are

   - (found-pieces (condition) )

       returns the squares where the pieces with condition true are (e.g., (found-pieces (attacked?) ), get all attacked pieces)

   - (found-marked-squares)

       returns all marked squares

   - (found-attribute <attr-name> <value> )

       returns the squares where the pieces that have <attr-name> with value <value>

A CASE statement. This may be useful, if ZRF starts handling non-boolean variables and functions.

    e.g.,

    (case (actual-player)

      ( (White) (...stuff...) )
      ( (Black) (...stuff...) )
      ( (Red)   (...stuff...) )

    ) ;endcase

Integer types with aritmetic (+,-,*,/,trunc,round) and relacional (>,<,=,<> ...) operators.  Also, local and global integer variables would be nice.

Random Numbers,
      e.g., rand(n) gives a number between 0 and n-1  with normal distribution

Possibly, ZoG doesnīt have integer types because of performance reasons (At least it is not real aritmetic)

back to top

webSearch | my variantschallengesother places