You are on page 1of 5

S O FT WA R E D E V E LO P M E N T P R O J E C T

AUTONOMOUS ROVER ALGORITHM


DESIGN
1. INTRODUCTION

This report will provide a description of any assumptions that have


been made in terms of solving the problem of creating a simulation
which provides intelligence to an autonomous rover that is to survey
random terrain . The design process for solving the problem at hand,
including the preliminary idea which was generated , the shortfall of
this preliminary idea, improvements incorporated into a final product
and shortfalls of this final product as well as an analysis of ways of
preventing such problems from occurring in future designs will also be
discussed.

1.1. Problem and requirements

A rover (which has limited functionality provided by an API which is


given) that is to survey the random surface of a planet needs to be
provided with sufficient intelligence in order to cover as much of the
planets surface as possible while avoiding any obstacles which it may
encounter, such as mountains etc., and also manage its energy
consumption.

1.2. API (Application Programming Interface )

An API (Application Programming Interface) provides the tools which


enable one to create a program. In the context of this project, the tools
provided are:

The generation of a surface that has randomly positioned obstacles,


the creation of a rover which has limited functionality (i.e. being able
to move, to get its position and energy level at any point in time, to
survey the surface and the ability to recharge) as well as a Base for the
rover to recharge on as well as are all provided by the API.

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.01 % taken up for checking the rovers energy level.


0.01% taken up for checking whether a block is navigable or not.

0.05% taken to get current position of the rover i.e. its exact
(x,y) coordinates

0.06% taken for moving the rover into a square.

0.01% to do a survey on that block.

All the above assumptions limit the scope of the project to a certain
extent.

PRELIMINARY ALGORITHM

1.3. Rovers intelligence

After an analysis of the problem at hand it was decided that the rovers
preliminary Intelligence functionality was to work in the following way:

The functionality for the rovers movement intelligence was to be


created in terms of prioritized movement. This meant that the rover
would first check whether it was able to move into a block in the north
direction and if it was not able to do so, due to there being an obstacle
to the north, it would then check if the block to the east was passable.
If the east direction was not passable it would then check the south
direction and if that was not passable it would then check whether the
west direction was passable.

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.

1.4. Shortfall of initial algorithm

The requirements of solving the problem were not met in the first
algorithm as they were not properly understood and the following was
omitted:

• There was no logging of the rover’s actions, current coordinates


or current energy level.

• The rover moved into blocks that it had already visited and
resurveyed those blocks, and thus wasting energy.

• The rovers movements were not displayed on a map.

• There was no function for the rover to return to base.

Thus a new algorithm was created to solve these problems.

FINAL ALGORITHM

1.5. Improvements to preliminary 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.

However, by not allowing the rover to move into a block that is


navigable and surveyed, one is effectively creating a situation where
the rover would, if certain blocks are unnavigable and the remaining
blocks surrounding it have already been surveyed, not be able to
move.

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

You might also like