I have just emailed grades for PS 3. If you didn't get it and did submit a PS3 let me know.

I have just posted problem set 4 and the final project handout. Note that the final project has a research option that allows you to do just the final project instead of PS4.

I forgot to bring test 1 to class today. I have posted the grades on the CSE dropbox system. You should be able to at least see your grade there. Hopefully, I'll remember to bring the tests in on Monday. You can also drop by today if you want to pick up your test.

The AgentLink Roadmap provides a good high-level view of the multiagent field (with an European bias). Its a good read.

I have posted PS3. Also, those of you looking for ideas for your final project feel free to browse over the papers in

I have just emailed your PS1 grades and comments. If you did not
receive the email then it is (probably) either because you did not
include your email address or you did not submitt anything.

Send me an email with your email if you want to get your grade.

I am sure you will have questions on the requirements for this PS. I have tried to be as precise as possible but, it is hard to be precise about what I want when I don' know what I want.

I thought about step 2 (find the gradient) of the algorithm in PS1 for a bit and realized that we can find this gradient by simply adding up all the vectors from where the turtle currently is (really) located to where the turtle should be given the neighbors' current (perceived) position and the (real) reported distance to the turtle. This should be the gradient vector as it minimizes the sum of the distances to the various positions where the turtle should be. I think.

The code below should implement this idea. Of course, I have not tried this code (might not even compile) and have no way of verifying that it does what I think it should. The purpose of the code is just to make the idea clearer.

;turtle function ; if other-node is a distance of more than d away from my perceived coordinates ; (where I think I am: my-xcor my-ycor) ; then report the unit vector which points towards other-node ; if other-node is a distance of less than d ; then report the unit vector which points away from other-node ; else report (0 0) to-report get-unit-vector-towards [other-node] no-display ;turn display off to hide the jump back and forth. let d distance-nowrap other-node ;the real distance to other-node let tx xcor ;save my coordinates let ty ycor setxy my-xcor my-ycor ;temporarily place myself where I think I am. set heading towards-nowrap other-node ifelse (distance other-node > d) [ report (list dx dy) ][ ifelse (distance other-node < d)[ set heading heading + 180 report (list dx dy) ][ report (list 0 0) ] ] setxy tx ty ;put me back where I really am display end ;turtle function ;reports a unit vector that is the gradient (step 2 in the algorithm) for this ; turtle given the-neighbors. ;the-neighbors is the list of neighbors to-report get-gradient [the-neighbors] let vector reduce [(list ((first ?1) + (first ?2)) ((last ?1) + (last ?2))] values-from the-neighbors [get-unit-vector-towards myself] let magnitude sqrt ((first vector) * (first vector) + (second vector) * (second vector)) report (list (first vector / magnitude) (second vector / magnitude)) end ;now, to move one step in the gradient you just have to let g get-gradient [the-neighbors] setxy (xcor + first g) (ycor + last g)

When you find problems with the code above, and you will, please let me know so I can update this.

Note that, if you don't want to use this method of calculating the exact gradient you can still use the method I described in class of doing a search testing the 8 compass points around the turtle's current location to see which one has the smallest error. That method might be a bit slower (not noticeable) but I think they should both arrive at nearly the same location.

Problem set one is now available. I suggest you get started
*now* because you will have to read a mathematically
sophisticated paper and learn NetLogo in order to do it!

Jose M Vidal Last modified: Mon Nov 28 15:55:59 EST 2005