ÿþ<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from url=(0051)http://odin.ac.hmc.edu/~mchan/cs154/2/results2.html --> <HTML><HEAD> <META content="text/html; charset=unicode" http-equiv=Content-Type> <META content="MSHTML 5.00.2919.6307" name=GENERATOR></HEAD> <BODY><BR> <H1>Bug navigation</H1> <H2><B>Lab #2 write-up<BR>Michael J. Chan<BR>Ben Hulse<BR>Peter Kasting<BR>2/27/01<BR></B></H2> <HR> <H3><FONT color=red>Results</FONT></H3><BR> <H4>Bug Algorithm 2</H4><BR>The bug algorithm in this section is a little sketchy. It makes a starting rotation toward its goal at the outset. Then, it runs the standard code from Project A (go straight and wall-follow). Once it encounters a point where the s-line intersects (and provided it was wall-following and a slope tolerance of 5 degrees), it calls the rotate function again to reorient itself. In order to try to avoid missing the turns and stopping point, the bug slows down within 5 inches of the targets. Some tweaks were made to make this code work with this project, so it is not as robust as in its previous form. <BR><BR><IMG src="bhulse2_2_files/buggif1.gif"> <BR><BR>On the second map, the results ended up being the same, though the bug refused to heed the sline in the middle of the traversal. Instead, because of the fortuitous shape of the map, it wrapped around and finished. I believe this is because this algorithm does not check the angles and relative location while doing a hard corner turn. It is a hard-coded turning function that seems to ignore most of its surroundings. <BR><BR><IMG src="bhulse2_2_files/buggif2.gif"> <BR><BR>All in all, the algorithm works even though it is a little loopy, and it misses a few cues, but at least in these cases, it turned out alright. All it needs is better checking, both in turns and while racing at break-neck speed. Sometimes, if conditions were just a little unfavorable, the simulator would skip, and the bug would go blithely onward. Thus, some greater tolerances should also be made here. <BR><BR>For the code, click <A href="http://odin.ac.hmc.edu/~mchan/cs154/2/wall3.txt">here</A>. </BODY></HTML>