Git Product home page Git Product logo

Comments (17)

chrismailer avatar chrismailer commented on September 24, 2024

The map_*.dat files are the archive_*.dat files generated with pymap_elites, just with a different filename. You can find the meaning of each line in the map/archive files here, and for the log files here.

from mailer_gecco_2021.

wzj-651123 avatar wzj-651123 commented on September 24, 2024

How does pymap_elites generate archive_*.dat? (Is it generated using “multitask.py”?)
I did a global search for "archive" and didn't find the path to save this.

from mailer_gecco_2021.

chrismailer avatar chrismailer commented on September 24, 2024

For our work it is generated using the cvt.py variant of pymap_elites not multitask.py. You cannot specify an archive location, the archive file will simply be saved in the same directory you are running cvt_map_elites.compute(...) from. Maybe have a look at the basic usage section in the pymap_elites readme with the rastrigin function to understand how it works and where the log and archive files are saved.

from mailer_gecco_2021.

wzj-651123 avatar wzj-651123 commented on September 24, 2024

Then there are 45 numbers in one line in the map_.dat file. Are these the control signals for the robot? What does each mean? Can it be understood that 45 numbers in a row are a controller, and the number of rows in the map_.dat file is the number of generated controllers?

from mailer_gecco_2021.

chrismailer avatar chrismailer commented on September 24, 2024

For each line the first value is the fitness of that particular gait (distance walked along x axis), the next 6 values are the centroid (location in the map), the next 6 are the descriptor for that gait (percentage of time each leg spends on the ground), and the final 32 values are the parameters for the gait controller. The number of rows is determined by the map size (number of centroids).

from mailer_gecco_2021.

wzj-651123 avatar wzj-651123 commented on September 24, 2024
  1. In Bayesian optimization, enter six centroids (columns 2-7 in the map), and then use the Gaussian distribution to select the location for the next optimization?
  2. In the representation of map, is the meaning of the horizontal and vertical coordinates a descriptor?
  3. What is the difference between centroid and descriptor (columns 8-13 in map)?

from mailer_gecco_2021.

chrismailer avatar chrismailer commented on September 24, 2024
  1. I don't understand what the question is? Bayesian optimisation fits a gaussian function to the fitness values in the maps, and then updates this expected fitness prior with the real fitness values as gaits in the map are tested on the real/failed hardware. A gait is tested if it has the highest expected performance in the map. This paper provides a better explanation.
  2. Yes, a descriptor with two values can be visualised as a 2D map. Higher dimensional descriptors are harder to visualise.
  3. There isn't a difference with what the descriptor and centroid mean. Both represent the time each foot spends on the ground. However, the descriptor is the precise value from the simulation, whereas the centroids represent a discretisation of the descriptor space. The map size is the number of centroids. After a simulation has determined a gait's descriptor its location in the map is determined by the nearest (euclidian distance) centroid. Only one gait can be associated with one centroid at a time. You can think of the maps descriptor space as being broken up into n evenly spaced bins, where the location of each bin is a particular centroid. Again, this paper probably provides a better explanation

from mailer_gecco_2021.

wzj-651123 avatar wzj-651123 commented on September 24, 2024
  1. How do the last 32 parameters in the map_*.dat control the robot? (in the PyBullet simulation environment)
  2. Is it possible to infer the 45 parameters in the map_*.dat based on the footfall diagram?

from mailer_gecco_2021.

chrismailer avatar chrismailer commented on September 24, 2024
  1. You can find the structure of the 32 gait parameters in the paper here on the bottom left of page 3. That is the same structure used in PyBullet.
  2. It isn't possible to see how the gait parameters correspond to footfalls, and vice versa without forward simulation. There is no constraint on the gait needing to be statically stable which is why we need a simulation with dynamics. The body falls slightly with some gaits which results in legs lifting up. That would be very hard to infer without accurate dynamics. The descriptor also only has the average time the foot spends on the ground and does not have information about when the foot touches down and for how long, so it would not be possible to create a footfall diagram from that. You could however get the descriptor from a footfall diagram.

from mailer_gecco_2021.

wzj-651123 avatar wzj-651123 commented on September 24, 2024

The map_.py in the article is a 2000045 list. I used pymap_elites to generate a map_*.py file of the same size, but it cannot be called normally in test_gait.py. The value of fitness in the map I generated is about a few hundred, but your fitness size is all less than 10.
When generating a map, can the size of the values in it be controlled?

from mailer_gecco_2021.

wzj-651123 avatar wzj-651123 commented on September 24, 2024
  1. Is a dynamic model used in the process of generating the map in this paper?
  2. In the caption of Figure 4 of 《robots that can adapt like animals》 in 2015, it is explained that "the behavior – performance map is created with a simulated robot (bottom left) in the open dynamics engine physics Simulator" is used in generating the map( http://www.ode.org ).”
  3. However, the map generated by "pymap_elites" has only mathematical meaning, not the robot meaning in the simulation.

from mailer_gecco_2021.

chrismailer avatar chrismailer commented on September 24, 2024

A fitness value of a few hundred doesn't sound correct. The fitness value is the distance travelled along the x axis in 5s which should definitely be below 10m. Maybe make sure you are only running the simulation for 5s. test_gait.py will help to see the gaits and debug any issues. All of the values have physical meaning so their sizes depend on their units.

  1. What do you mean by dynamic model? The physical parameters of the simulation all stay the same between runs, only the controller parameters change. Not sure if that's what you're asking about.
    2/3. The physical robot is embedded in the map through the relationship between the fitness and controller parameters. It is not possible to get the fitness of specific controller parameters without simulating full dynamics with contacts, friction, and joint torque limits.

from mailer_gecco_2021.

wzj-651123 avatar wzj-651123 commented on September 24, 2024

In the process of generating maps now, I just randomly generate a lot of values, which have nothing to do with the robot model. So, how do you use the robot model to calculate the controller parameters and fitness values in the map?

from mailer_gecco_2021.

chrismailer avatar chrismailer commented on September 24, 2024

That's good, nice! So the way Map Elites works is it passes 32 parameters to the gait controller which produces a particular gait. This gait is simulated in the pybullet physics simulation and returns a fitness parameter and a behaviour descriptor. This process is iteratively repeated to find gaits with better and better fitness values, whilst also being sufficiency different based on the behaviour descriptor. What you get in the end is a set of diverse gaits which also all have high fitness values, with the map size determining the number of gaits. That is why Map Elites is referred to as a quality diversity (QD) algorithm as it produces both high quality and different/diverse solutions.

Those values being generated have everything to do with the robot model. The robot model is used to simulate a gait. Map Elites passes 32 parameters to the gait controller and simulator and then based on how the robot walks you will get out a fitness value and behaviour descriptor. If you change the robot model and make it heavier or give it shorter legs, it will walk differently and your fitness and behaviour descriptor values will now be different even with the same gait parameters. If I'm not explaining this well enough, please go and have a look through the paper Robots that can adapt like animals. They do a really good job explaining all of the questions you've had.

from mailer_gecco_2021.

wzj-651123 avatar wzj-651123 commented on September 24, 2024

When you generated the map, how did you combine the robot model? In the 2015 paper, it seems that the C++ language is used to do this? I'm a little bit confused now what should I do with this generation process?

from mailer_gecco_2021.

chrismailer avatar chrismailer commented on September 24, 2024

So Map Elites requires a function which given a set of parameters, returns a fitness and descriptor.
function(x) -> fitness, descriptor
The function evaluate_gait in the file generate_map.py does this. Inside this function I create a controller with the parameters x and pass this to the PyBullet simulator which simulates the gait and returns a fitness. I also determine the descriptor from the foot contact sequence. Both of these then get returned to Map Elites. This is how the robot model is combined with map generation.

from mailer_gecco_2021.

chrismailer avatar chrismailer commented on September 24, 2024

Hi is everything working? Can I close this issue?

from mailer_gecco_2021.

Related Issues (1)

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.