Professional Documents
Culture Documents
1.3 Assumptions
After having thoroughly tested the API, The assumptions made for the
algorithms and code generated for this project are as follows:
• The rover may only move into a block four directions from its
current position i.e. north, south, east or west.
• The surface generated may be split into a number of blocks and
always has the same size (i.e. the same number of blocks in the
x and y directions) namely that of (80,40) if the block with
coordinates (0,0) is included.
• The surface has obstacles situated randomly on it, but the base
is always at the same location namely (39, 19).
• The amount of energy taken up by the rover performing its
different functions is as follows:
0.05% taken to get current position of the rover i.e. its exact
(x,y) coordinates
All the above assumptions limit the scope of the project to a certain
extent.
PRELIMINARY ALGORITHM
After an analysis of the problem at hand it was decided that the rovers
preliminary Intelligence functionality was to work in the following way:
Once the rover had found a navigable block it then moved into that
block, getting its new position and its energy level and then surveying
3
the block which it was on. All of these actions were carried out by the
movement function.
The requirements of solving the problem were not met in the first
algorithm as they were not properly understood and the following was
omitted:
• The rover moved into blocks that it had already visited and
resurveyed those blocks, and thus wasting energy.
FINAL ALGORITHM
In the final algorithm the movement logic is the same as that of the
preliminary algorithm. However new functionality was added to the
rovers intelligence in order to ensure that it does not move into blocks
that have already been visited.
Thus in such a situation the rover now has the intelligence to move
through blocks that have already been surveyed but while doing so not
surveying those blocks and hence conserving energy.
4
5