|
This is an optimazation problem
You need a little calculus for this one.
if X=crates on the ground and Y=crates in the stack and C= the number of crates you have control of in your scoring zone and S= the score
Assume one robot on ramp. if two replace 25 in Eq.2 with 50. if none replace 25 with 0
Eq.1: X+Y=C
solved for X: X=C-Y
Eq. 2: XY+25=S
Substitute Eq. 1 (solved for X) in for X in Eq. 2.
(C-Y)Y+25=S=-y^2+CY+25 (here's your quadratic)
take the derivative of this:
S'=-2Y+C
Set this Equal to 0 and solve for Y to find the maximum
-2Y+C=0
Y=C/2
Therefor the maximum score you can have is with exactly half your crates in the stack. This is only relevant for even numbers of crates. with odd numbers it doesn't matter if you have one more in the stack or on the floor.
-Robin
|