Giter Site home page Giter Site logo

Comments (2)

keiwando avatar keiwando commented on July 28, 2024

Hi!

None of the tasks use only a single joint position in order to determine the fitness of any creature. The position of the creature used in the running task for example is the average of all joint positions. The obstacle jump factors in the maximal height and the duration of contact of any joint with the obstacle.

The jumping task, which is what I think you are referring to, uses a weighted average of the highest joint's and lowest joint's distance from the ground with a weighting ratio of 4 : 1 in favor of the lowest joint (So an actual jump is rewarded higher than just a stretch).

Here's the relevant piece of code:
https://github.com/keiwando/evolution/blob/master/Assets/Scripts/Util/JumpingObjectiveTracker.cs
(Ignore the maxHeightJumped field, I just noticed that I had forgotten to remove that from the code. It's not being used for anything.)

I'm absolutely not saying that this is the perfect fitness function in any way, but here are at least some of my reasons for going with this one instead of other possible variants:

  • Only using the highest joint's position would purely award tall creatures and creatures that can stretch the furthest. A creature that can jump almost as high as another one can stretch (without jumping at all) would get a lower fitness score, which is not what we want.
  • At the start of the simulation when pretty much no creature can jump yet, we need a way to distinguish ones that are showing signs of potential future success, which we can't do if we're only relying on the lowest joint's height above the ground.
  • Awarding fitness based on the average position of all joints would assign more fitness to a creature that can't jump but has a higher center of gravity simply based on its joint distribution than another design that can jump but only reaches a lower center of gravity with its jump (e.g. because most of its joints are in the lower half of the body).

The problem with the current fitness function is that if a creature can stretch very far, the fitness can still be thrown off in favor of a stretching behaviour.

It might be interesting to try an extended variant of the current function where all joints are considered, but lower joints drag the average down further than higher joints can drag it up (so an extension of the current weighting process) so that a definitive jump can easily lead to a better score than just a stretch.

from evolution.

bartman081523 avatar bartman081523 commented on July 28, 2024

Thank you for the detailed explanation.
No, i was not using the jump task but the first task, distance on flat ground, the creature evolved to travel in loop jumps. I want to see what will happen when i train the creature again with the jump task.

from evolution.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.