Commit f3caa3c1 authored by Hubert Denkmair's avatar Hubert Denkmair
Browse files

Merge branch 'bot_size_formula' into 'dev'

Tuned bot radius formula

See merge request GPN18Programmierspiel/gameserver!19
parents d4b4421e d7bbd6c4
......@@ -53,7 +53,8 @@ void Snake::ensureSizeMatchesMass(void)
}
// update segment radius
m_segmentRadius = std::sqrt(m_mass) / 2;
m_segmentRadius = std::pow((20*m_mass+100), 0.3) - 3.9810717055349722;
// 100**0.3 --------^
}
real_t Snake::maxRotationPerStep(void)
......
#!/usr/bin/env python3
import numpy as np
import matplotlib.pyplot as pp
mass = np.arange(0, 500e3, 100)
radius1 = np.sqrt(mass)/2
radius2 = (20*mass+100)**0.3 - 100**0.3
#radius2 = 30*(np.log2((mass+10000)/100) - np.log2(100))
pp.plot(mass, radius1, 'r')
pp.plot(mass, radius2, 'g')
pp.show()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment