Just. The game mechanics should avoid to accidentally benefit players by its random nature. The order of execution of the AIs should not benefit any player. The position of the newly create coins should try to be as just for everyone.
This issue targets the constraint:
The game mechanics should avoid to accidentally benefit players by its random nature.
In a nutshell: A Player benefits significantly, when Ammo is dropped the closest to them.
The ClashJS World is too limited and too much information is leaked to a Player through the ai
method's arguments. A Player can calculate the best possible series of steps at the beginning of the Game when the first Ammo appears, even if multiple Ammo is dropped, a Player can calculate whether they will survive or stalemate.
A Players set of moves are limited to:
- Idle
- Turn (4 possible directions)
- Move
- Shoot
However, clearly all moves will attempt to go towards Ammo, a Kill or Evade
- A move towards Ammo when there is no other player with Ammo, or the number of steps to Ammo without being in danger of other Players who could also reach Ammo, A Player can determine whether they will reach it in time or not.
- For a Kill to be successful you must be positioned at a vantage point and/or your enemy/target must be positioned at a disadvantage (facing back), otherwise any Player may successfully avoid a Shot.
- Evade is very powerful, if the Player manages to reach a 1 on 1, they have essentially guaranteed a stalemate unless they where positioned at a disadvantage.
Proposed Solution
Similar to the Finally Fantasy 7 Turn Based Mechanism.
Give each player a Agility property ranging from 0 to 1.
Instead of ordering turns randomly, order them by a Player's Agility value, the one with the highest Agility will move first.
At first, each Players Agility can be subtracted randomly by 0.01 to .2
Have a Base Rate of Recovery for the Agility.
For example: .3
on every new turn.
Give each move a Agility cost. Agility Point = AP
For example:
- Turn:
-.1 AP
- Move:
-.4 AP
- Shoot:
-.2 AP
- Idle:
+.1 AP
Base the ClashJS World around Agility Points.
For example:
- A Move costs
.-4 AP
plus, -.17 x <numberOfAmmo>
- A Turn may have an extra
-.05 AP
cost if it is a 180 degree turn, instead of 90.
- Terrain Tiles may add/remove Agility Points to the total Rate of Recovery, and/or add/remove ancost to a move
- Recovery/Booster Items, that restore Agility Points.
Per Round/Per Game/Temporary Effect Items
that modify the cost for a Player's move, like a Laser Upgrade
that reduces its cost or a Rocker Upgrade
that reduces the cost to Move.
For example:
- A
Space Dust Tile
adds a 20% increase in the cost to make a Move.
- A
Habitable Planet Tile
doubles the Base Rate of Recovery, while a Player remains on the Tile.
- A
Giant Meteor Tile or NP*
that simply blocks a Player's movement and Laser Shots.
NP*
= Not Player, AI Enemy. Like Playing Mario Smash
I believe this solution will eliminate randomly benefiting Players based on their: initial position and Ammo drop locations.
A Player will not be able to determine another Player's moves with certainty since they may have more Agility Points, and thus evade a Shot at point blank, since they will be able to move more often.
This will effectively force Players to write true AI code, as the complexity that is required to predict a Winning Game, is nearly impossible.
Lets discuss :)