📜 ⬆️ ⬇️

My version of the rules HabraWars

Here is described the idea of ​​a friend @p_r_i_m_a_t.
My thoughts on the rules under the cat:


  1. Battle - a battle between the same robots , controlled by the participants' programs (hereinafter referred to as robots )
  2. The battle takes place on a rectangular map of a previously unknown size, which consists of fields . All objects in the game are about the size of a field. The battle takes place in turn-based mode.
  3. Fields are of the following types:
    • regular field - ordinary field. On it, the robot can pass, can sweep.
    • barrier - not passable, not through the field
    • (?) water - not passable, but shot through field
    • (?) "Bushes" - passable, but not through the field
    • “Charging” is a field with “charging”. Becoming on such a field, the robot receives ammunition / energy

  4. Robots have the following parameters (equal to all robots at the start):
    • The standard of living is unknown in advance. With each hit in the robot decreases by one. Not restored. When reaching zero - the robot dies
    • Ammunition - unknown in advance. With each shot of the robot decreases by one. Restored in the fields of "charging" ammunition.
    • The energy level is unknown in advance. Each turn is reduced by one. The "accuracy" of the robot depends on the level of energy (perhaps in the reverse geometric progression? Here you need to think). Can be recovered by friendly robots located in the adjacent field, by pumping their energy in the amount (?) Of 10% of the initial energy per turn

    Robots are controlled by player programs, programs can use the following operations (one per turn) on robots:
    • Move operations: turn left, turn right, step forward
    • Survey operation: applying this operation (and, accordingly, standing in place), by the beginning of the next move, the robot receives information about fields within a radius of 4 cells from itself (again, you need to think about it, maybe it’s better to have a square around, and you need to think about the size)
    • Operation shot: shoot at the enemy in sight. The farther to the enemy and less energy shooting, the less likely to get.
    • Operation "Idle": stand, do nothing
    • Operation "share energy": In a command game, siphon your energy to a friendly robot in a nearby field
    • Message operation: send a friendly robot, located near (or in sight) message. The content and meaning of messages should be discussed in advance with the allies.

    In addition, at the beginning of the move, the robot has information about the sector visible ahead of it. (you need to think about its shape and size). In the command game the messages of friendly robots and their coordinates are also reported to the robot, if in the previous move they were at a fairly close distance (or in sight, you need to think)


    Something like that. Simple enough, and in my opinion, interesting.

')

Source: https://habr.com/ru/post/74536/


All Articles