- We're going to start off playing with Buckland's miner code.
- I don't care if you download his C++ code, or use my (admittedly
inferior) C# version. Get it.
- For the C++ code I grabbed it from
as suggested on page xxi. I did it in gnu g++ on cygwin and had
to turn off some of the text colours.
I didn't understand how he initialized variables with the : in
Miner.cpp. I also don't really understand how he's creating
new states, but I have a rough idea.
- As we're using C#, I did a quick hack to stick it into C#.
Grab the file minerC#.rar off my
server. You'll have to save as minerC#.rar or convert it (I
don't think my server will serve up .rar files.).
- Now that you have something, get it running. (4 points)
- You should get something like the figure on page 51.
- Futz around with it a bit so you get a feel for it.
Change some messages. Put some print stubs in. Change
- If you're using C# can you figure out how to get the
end of the window to display instead of scrolling each
time? (1 point)
- Try something slightly better. Add in a new state (gone
fishin). Whenever he is anywhere, he has a 10% chance of
just giving up and going fishin. After fishin, he goes home.
- Try to add another state of your own. (1 point)
- Can you put Elsa in? (If you're using C#, you might want to
try some subclassing.) (1 point)
- Can you add message passing?(1 point)
- What's going to happen when there are lots of agents communicating,
and effecting each other?