BerryBots forums
http://berrybots.com/forum/

Maximum ship speed
http://berrybots.com/forum/viewtopic.php?f=3&t=443818
Page 1 of 1

Author:  Croug [ Fri May 06, 2016 6:12 pm ]
Post subject:  Maximum ship speed

I've migrated from genetic programming to TWEANNs (Topology and Weight Evolving Artificial Neural Networks) using the NEAT (NeuroEvolution of Augmenting Topologies) algorithm, and in order to make an effective neural network all of the values have to be scaled between 0 and 1 or -1 and 1 so I need to know what the maximum ship speed is in order to present the ship speed to the network in a format supported.

So the final question is, what is the maximum speed of a BB ship?

Author:  Voidious [ Mon May 09, 2016 3:35 pm ]
Post subject:  Re: Maximum ship speed

There is no max speed - on a big enough stage, you can get going as fast as you want. But on the sample battle stages (eg battle1) with a width of 1200, if you just go max speed horizontally, changing thruster direction after bouncing off the walls, my rough calculations say you could get up to about 55.

My logic: start at one wall, get up to speed 49 => 49 ticks * avg speed of 24.5 = 1200 total distance (and you hit the wall). Then you bounce and have a speed of 24.5, get up to 54.5 => 30 ticks * avg speed 39.5 = 1185 (and you hit the wall again, because a ship has 16 diameter, making effective stage width 1184).

You could also consider using log(speed) instead of speed and capping at something crazy like 1000.

Hope that helps!

Author:  sadd [ Sun Jun 23, 2019 9:08 pm ]
Post subject:  Re: Maximum ship speed

The exact formula should be

vmax = sqrt(8/3*distance*amax)

- vmax is the maximum velocity achievable in a specific stage
- amax is the maximum acceleration (1 in berrybots)
- distance is the maximal value of height or width of the stage

For a distance of 1200 this means vmax = 56.5685(...).
I assumed you only move along one axis (x or y), since bouncing in angles and corners either reduces the velocity multiple times or the bot has a shorter distance/path to accelerate to the final velocity.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/