Input Structure
Fitness Config
p0.x, p0.y, p0.z, pT.x, pT.y, pT.z, minT, maxT
R, C
numBounces[, bounceOrder]
tossSign, catchSign
normal.x, normal.y, normal.z, position.x, position.y, position.z, scale - (surface 0)
...
normal.x, normal.y, normal.z, position.x, position.y, position.z, scale - (surface N)
GA Config
maxGenerations, populationSize, mutationChance, mutationScale, initialScale, fitnessThreshold, noGA
Input Description
Fitness Config
- p0 - starting position
- pT - ending position
- minT - minimum amount of time for bounce path
- maxT - maximum amount of time for bounce path
- R - ball radius
- C - ball coefficient of restitution
- numBounces - expected number of bounces
- bounceOrder (optional) - comma separated list of surface indices representing the bounce order. So 1,0 means bounce off surface 1 first, then surface 0
- tossSign - 1 means the toss is up, -1 means the toss is down, u means it doesn't matter
- catchSign - 1 means the catch is made while the prop is traveling up, -1 means the catch is made while the prop is traveling down, u means it doesn't matter
- surfaceNormal - vector for the surface normal
- surfacePosition - vector for the position of the center of the surface
- surfaceScale - all surfaces are squares with an edge parallel to the x-z plane, the scale provides the half-width of the square
GA Config
- maxGenerations - max number of generations to run GA for
- populationSize - total size of each generation
- mutationChance - percentage chance that a member will mutate
- mutationScale - maximum magnitude of mutation
- initialScale - maximum magnitude of newly generated members
- fitnessThreshold - maximum distance from pT to be considered a success
- noGA (optional) - set to 1 to turn off selection by fitness and mutation (ie. iterating through random solutions)