swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] Heatbug code question


From: lra
Subject: Re: [Swarm-Support] Heatbug code question
Date: Sun, 14 Nov 2004 17:20:24 -0800 (PST)
User-agent: SquirrelMail/1.4.3a

Crile Doscher wrote:
> Hi there,
>    This question relates to the logic of the Heatbug code, specifically
why a method is
> implemented where it is.  If that sounds like you, read on!
>    I'm putting together a simulation of braided rivers where water
objects (originally
> called drops until I realised that that name was special...) flow over a
river bed and find
> their way by moving in the direction of the steepest slope.  I've been
paying attention to
> how Heatbug implements bug movement and wonder why it is that the actual
method
> that looks at the eight cell neighbourhood around a particular cell
(findExtremeType) is
> implemented in HeatSpace.m rather than in Heatbug.m. The Heatbug then
determines
> which cell it will move to, but HeatSpace does the work of figuring out
which cell would
> be the best to move to.  This is part of the process of getting my head
around Objective
> C.  Any thoughts?  Thanks -

As I understand from those with more experience, the very essence of
object-oriented programming is sitting around a table bickering about
which behaviors should be in which classes...

In our fish models, the fish asks the space for a list of cells within a
certain distance and then the fish evaluates the cells and decides which
one to move to. To me, that's a better metaphor for what happens in real
fish...and that metaphor is the best guide for designing the software.
(All of which I learned from Glen Ropella.)

Steve Railsback

-- 
Lang Railsback & Associates
250 California Ave.
Arcata CA 95521
707 822 0453



reply via email to

[Prev in Thread] Current Thread [Next in Thread]