BerryBots forums

It is currently Tue Jul 27, 2021 2:05 am

All times are UTC

Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Maximum ship speed
PostPosted: Fri May 06, 2016 6:12 pm 

Joined: Fri Nov 13, 2015 12:38 am
Posts: 18
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?

 Post subject: Re: Maximum ship speed
PostPosted: Mon May 09, 2016 3:35 pm 
Site Admin
User avatar

Joined: Sat Nov 17, 2012 5:03 am
Posts: 88
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!

 Post subject: Re: Maximum ship speed
PostPosted: Sun Jun 23, 2019 9:08 pm 

Joined: Wed Sep 23, 2015 12:17 pm
Posts: 22
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.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group