Tuesday, 30 September 2014
 
Energy cycle

The energy is the main element of Rat's Life. A match is finish when the energy of one robot becomes zero. This robot loose while its opponent wins the current match.

The energy cycle follows these rules:

  • An e-puck has between 0 to 200 units of energy.
  • At the beginning of the match, an e-puck has 200 units of energy.
  • The first robot having 0 unit of energy loose the game.
  • A feeder has between 0 and 100 units of energy.
  • At the beginning of the match, a feeder has 100 units of energy.
  • The time for an e-puck which doesn't move to pass from 100 to 0 units of energy is 90 seconds. Moving the e-puck gives a very small advantage in term of energy, in order to encourage displacements.
  • The time for a feeder to pass from 0 to 100 units of energy is 120 seconds. 
  • When a feeder has 100 units of energy, its LED is switched on. Otherwise the LED is switched off.
  • When a feeder has 100 units of energy and when an e-puck is placed in front of this feeder(6.4[cm] around the center of the feeder), the energy of the feeder and of the e-puck follow this rule:
if (FeederEnergy==100 and distance(EPuck, Feeder) < 6.4[cm]):
  if (EPuckEnergy < 100):
    EPuckEnergy = MINIMUM(100, EPuckEnergy+100)
    FeederEnergy = 0
  else:
    FeederEnergy = 0

These rules can be modified during the contest, in order to render the matches more interessant. If so, a message will be displayed on the forum.


Energy attribution

The following video shows an example of energy migration from a feeder to an e-puck:

 

 
 
Top! Top!