User:Mwaandah

From Robin

Revision as of 11:53, 7 December 2018 by Mwaandah (Talk | contribs)
Jump to: navigation, search

Old fitness function(generation 19(blue) and 9989(green))

500px]

New fitness function(generation 19 and 9992)

500px


Change of fitness function(generation 19(dark green) and 9992(light green))

def fitness(self):

      """
      Fitness is proportional to both the displacement and absolute
      velocity of the center of mass of the robot, in the formula:
      (1 - d l) * (a dS + b S + c l)
      Where dS is the displacement over a direct line between the
      start and end points of the robot, S is the distance that
      the robot has moved and l is the robot size.
      Since we use an active speed window, we use this formula
      in context of velocities instead. The parameters a, b and c
      are modifyable through config.
      :return:
      """
      age = self.age()
      if age < (0.25 * self.conf.evaluation_time) or age < self.conf.warmup_time:
          # We want at least some data
          return 0.0
      v_fac = self.conf.fitness_velocity_factor
      d_fac = self.conf.fitness_displacement_factor
      s_fac = self.conf.fitness_size_factor
      d = 1.0 - (self.conf.fitness_size_discount * self.size)
      v = d * (d_fac * self.displacement_velocity() + v_fac * self.velocity() + s_fac * self.size)
      return v if v <= self.conf.fitness_limit else 0.0

def displacement_velocity(self):

      """
      Returns the displacement velocity, i.e. the velocity
      between the first and last recorded position of the
      robot in the speed window over a straight line,
      ignoring the path that was taken.
      :return:
      """
      dist, time = self.displacement()
      if time.is_zero():
          return 0.0
      return dist.x / float(time)
      #Old: return np.sqrt(dist.x**2 + dist.y**2) / float(time)


Plan for master year:

Week Plan
Week 38 Essay delivery
Week 39 Get used to simulator program
Week 40 Get used to simulator program and make first program in it
Week 41 Get used to simulator
Week 42 Plan experiment
Week 43 Plan experiment
Week 44 1st experiment
Week 45 1st experiment
Week 46 1st experiment
Week 47 2nd experiment
Week 48 2nd experiment
Week 49 2nd experiment
Week 50 3rd experiment
Week 51 3rd experiment
Week 52 Christmas
Week 1 3rd experiment
Week 2 Write about results
Week 3 Write about results
Week 4 Discussion
Week 5 Discussion
Week 6 Discussion
Week 7 Proofreading
Week 8 Proofreading
Week 9 Proofreading
Week 10
Week 11
Week 12
Week 13
Week 14
Week 15 Ready for delivery
Week 16
Week 17
Week 18 Delivery!
Personal tools
Front page