Stable sort 

I use Framsticks GUI as a fast way to look at populations and sort them using different columns.
Eg. Sort on Total fitness - the first and sort on instances - the second.

Is it possible to make sorting algorithm stable. So genotypes with the same instance numbers are sorted based on Total fitness?

Maciej Komosinski's picture

Quicksort is used for sorting

Quicksort is used for sorting and it is not stable.

However, you could write a simple macro that, for all genotypes, assigns a weighted sum (or some other function) of the number of instances and final fitness to one of the three "userX" fields, and then use this "userX" column for sorting.

OK, i try do it. BTW I use

OK, i try do it.

BTW I use user3 variable as calculation of distance as a length of line segment between starting and ending simulation point.

Distance computed by framsticks is a length of a path between starting and ending position.
In such definition distance is proportional to (speed * lifespan).

Maciej Komosinski's picture

If you set "performance

If you set "performance sampling period" longer than the life span, then the distance field will be

|(location of death) - (location of birth)|

 
 
 
On the forum: