CSCE 782: Problem Set 1

Due: Wednesday, 4 September 2002, 2:30pm

Upload Problem Set

Figure 1: The Tileworld implementation you will be using. Click on the picture to see the applet run and get the source code, or get the source code here

Tileworld meets Netlogo

For this problem I have recreated the Tileworld, as described in pages 37-39 of the textbook, shown in Figure 1. Your goal is to solve the tileworld problem. You will be graded on how well you explain your approach as well as on how well your program performs. The tileworld originally appeared in


In my implementation, each time the update function is called all the agents (which I call robots) get a chance to move one unit. At each time a new tile appears with probability tile-birth-prob and lives exactly tile-lifetime. Similarty, at each time a new hole appears with probability hole-birth-prob and lives exactly hole-lifetime. The score is calculated using the formula from page 38 of the textbook, that is, the percentage of holes filled with respect to the total number of holes that have appeared.

You should mostly concentrate on improving the move function.

Whenever your robot needs to move it should set the heading it wants (making sure that it is one of 0,90,180,270) and call move-one to move one step in that direction. This function makes sure that any tiles or other agents that are in that location are pushed away. This also means that one robot can push another one.


I will test your program with num-robots=20, tile-birth-prob = hole-birth-prob = .5, tile-lifetime = hole-lifetime = 50 and with other variations on those numbers in order to test the robustness of your approach. Notice that with these numbers my dumb greedy approach gets a score of about 38, so you should do better than that.


  1. Start early!
  2. Think first. Then think it through again. Then implement it. Repeat.
  3. Your robots can look at the time-to-live of the tiles and holes.

Further Research

Submission Instructions

This problem set is to be done individually. You cannot ask or receive help from anyone. As will all the problem sets, you will hand them in using our department's dropbox. For the netlogo problem sets you will hand in only one file, your .nlogo file. You will use the information tab of the program for writing your detailed explanation of the techniques you used, how the program works, how to set the controls to obtain the different behaviors you want to show, etc. The information tab needs to start with:


I understand that it is the responsibility of every member of the Carolina community to uphold an maintain the academic standards and integrity of the University of South Carolina. Any member of the University community, who has reasonable grounds to believe that an infraction of the Code of Student Academic Responsibility has occurred, has an obligation to report the alleged violation.

I certify that I have neither given nor received unauthorized aid on this problem set.


José M. Vidal
Last modified: Wed Aug 28 17:46:54 EDT 2002