Group:Exercise1-Aggregating
Contents |
Introduction
In this exercise, you will learn how to make a swarm of robots used for aggregation. Aggregation is grouping together into one bunch. First, set up a swarm such as shown in Group:Group Howto. Next, design a controller to achieve this purpose.
Algorithm
The algorithm for the robot controller is rather simple:
1. If you can see no blobs, turn to the right. 2. If a blob is to the left of the screen, turn left, move forward. 3. If a blob is to the right of the screen, turn right, move forward.
Initial Condition
In the initial condition, the robots should be arranged roughly as so:
Error creating thumbnail: convert: unable to open image `/home/groups/r/ro/roboticsprimer/htdocs/workbook/images/thumb/7/7e/Before.jpg/600px-Before.jpg': Read-only file system.
End Condition
At the end, the aggregation should group the robots together as so:
Error creating thumbnail: convert: unable to open image `/home/groups/r/ro/roboticsprimer/htdocs/workbook/images/thumb/1/12/After.jpg/600px-After.jpg': Read-only file system.
Files
Below is an example solution for the aggregation exercise. This solution is designed to run with the following player and stage files:
![[LOGO]](/workbook/skins/workbook/create_small2.png)



