1 Plot Method - This is our final method/strategy for the competition.
Optimize time spent on waiting for crops to grow or other things to happen
Optimize battery score by reducing amount of movement needed, e.g. only need to move to watering zone instead of different plots
Innovative Solutions and Methods
Vector math to calculate most optimal point in watering buffer zone
*intersection between line formed from target point to current robot position and inscribed sphere with center at target point (watering zone or plot center)
*intersection between line formed from target point to current robot position and cube with center at target point (watering zone or plot center), more precise
Point getApproachPoint(Point end, double stopDist) function pseudocode:
// get robot current position
// find the direction from where we are to the target
Point direction = {end.x - start.x, end.y - start.y, end.z - start.z}
// get how long that direction is (i.e magnitude)
double magnitude = sqrt(direction.x * direction.x + direction.y * direction.y + direction.z * direction.z);
// turn the direction into a unit vector
Point unit = {direction.x / magnitude, direction.y / magnitude, direction.z / magnitude);
// moves back the distance needed from the target away (stopDist) so that we are not too close
stop = {end.x - (unit.x * stopDist), end.y - (unit.y * stopDist), end.z - (unit.z * stopDist)};
// return the point to stop at
Knapsack to generate end sequence
The knapsack problem proposes the problem of optimal packing of multiple different weights in a knapsack that can hold a certain amount of weight. It connects to our code because in the last 60 seconds we only have a certain amount of time to plant crops and we need to get the maximum amount of points. The different crops have a given amount of time needed to grow and grant different points so in order to maximize points with the time given the robot must plant certain crops.
Other Methods We Tried
Method 1: Two Plot Method (see "Two Plot Method" subpage for flowchart)
Pros: simultaneously grow crops
Cons: there is a substantial amount of waiting around and moving between plots in this method
This is not our main method due to how inefficient the method /strategy is.
Pros: can simultaneously grow crops
Cons: This is not the most methodical strategy, as there is an extreme amount of waiting around and moving between plots in this method
This is not our main method due to how disorganized the method/strategy is, but it has more potential due to more variables, e.g. permutations of plots etc.
For all these strategies, certain things in the code can be changed to make it more efficient and increase the points earned in these strategies, such as which plots to use, crops to grow, and other variables.