[starlogo-users] Epidemic tutorial and other comments...
klopfer at school.mit.edu
Wed Mar 7 22:15:41 EST 2007
Good points Josh.
There were a couple of reasons why I chose to do it this way, though in the end the bad habits that you site are a good reason to change.
1) (and this is probably the best/worst reason) at the time the tutorial was made booleans were a little flaky (though they're fine now)
2) the notion of booleans requires some explanation, it is good programming style but requires an introduction, whereas "color = red" does not
So bottom line is that we'd love your revised versions and can integrate them into the tutorial when we update the site for beta 1. A little bit of explanation can help out on why one uses booleans.
As far as collisions go, there have been quite a number of improvements for this version, but when agents are moving faster than forward 1, they will still often miss. This is not likely to change soon, as computing that would slow things way down. But if you're moving forward 1 or less then things should work just fine in the next release.
In general just fire away bugs to bug-starlogo at education.mit.edu.
Thanks for the feedback.
----- Original Message -----
From: "josh" <jbuhl_nospam at gmx.de>
To: starlogo-users at education.mit.edu
Sent: Wednesday, March 7, 2007 4:34:33 PM (GMT-0500) America/New_York
Subject: [starlogo-users] Epidemic tutorial and other comments...
First of all, I can't tell you enough how great I think StarlogoTNG is.
I'm a teacher and this software is very motivating for my kids and I
think it's great, so don't get me wrong on my criticism below! :-)
I pointed my kids to the online tutorials and gave them a similar
assignment. I noticed my kids all had some very poor implementations of
variables, and they pointed out that that was exactly how it was done in
the Epidemic tutorial. I checked as was surprised to notice that the
tutorial isn't really in very good programming style.
In the example collision block the test for whether an agent is sick
shouldn't be by checking his color, it should be by checking a boolean
agent variable called "is sick". Similarly using a number agent variable
for Immune and then checking whether it's equal to 0 is a poor man's
hack for a boolean "is immune". The continues with the monitor, which
then shouldn't count everybody with "color = red" but with "is sick".
I've created a very clean (I think) implementation of the Epidemic
simulation and would be happy to contribute it if you are interested.
I've also made a clean implementation of the paintball game (which I
would also be happy to contribute) in which the agents fire back at
mario with variable firing rate, and the paintballs have limited
adjustable range. However, there seems to be a bug in the collision
logic in StarLogoTNG, as many paintballs fly right through Mario without
triggering the collision block, especially when the paintballs are
smaller. Do you have bugzilla or some other bug database where users can
cheers again and onward to Release 4/Beta 1!!!
starlogo-users mailing list
starlogo-users at media.mit.edu
More information about the starlogo-users