WhiteBoard Class (for these Boids)

http://gist.github.com/343358

This seems to work with decent performance but I have little/no
experience using some of these features - almost seems “too good to
be true” to this old time programmer that spent days designing/testing
linked lists in the old days… its 40 lines of code that seems to
have some pretty cool abilities. (And ya, it could be a hash of
hashes…)

I had this idea based on something I saw in ‘Builder’ and have read
about and tonight I just spent sometime testing it and it just worked
right out of the gate. It seems to work for my special purposes -
will chat about that below if somebody is interested (involves the
Boid project).

Mostly I’d appreciate any kind of warning if this seems to be some
sort of a boon_doggle. Design wise it seems so simple and would allow
me to clean up some issues communication issues (between passes)

I’m not looking for pointers on how to save a line of code or too
worried about conventions just now, please. My question is if this
approach is being used “around” and if it seems likely to stand up to
some fairly heavy use - that would be maybe 500 or so “satz” per pass
in the not so far future.

thunk

ps concerning this and the ‘boid’ design I now have about 50 boids
in each of two “waves” and I have established communications between
passes. (They are fired! serially) and so on BUT it is just getting
awkward as implemented with some redundancy creeping in. Oh no. I’ve
been thinking about this for awhile.

The problem is that every “boid” leaves a “casing” and the “casing” is
all that is left after it gets fired. But it is terrible design to
have to expand the “casings” for communications, this is a way to keep
it generic so a Framework can get lifted out of this project
eventually.

Anyway the idea is that each HelperClass assisting the Boid can “throw
anything potentially useful” onto one “WhiteBoard” per pass. Then the
ControlPanel and other things responsible for figuring out “what
happened” can review the WhiteBoard for their specific purposes.

Minor quibble. The code dies not run for me under 1.8.7

white.rb:13:in method_missing': wrong number of arguments (2 for 1) (ArgumentError) from white.rb:13:input_satz’
from white.rb:56

Secondly it is hard to make sense of the code without some idea as to
what
it is supposed to do, incomplete code at that.

If you could say what the code is supposed to implement, the problem
rather
than the solution, then we will have something to say about it. It could
be
a perfect implementation with nothing more to be done or it could be the
worst. Without knowing what it is supposed to solve there is little
anyone
can say beyond, maybe, some minor tweaks.

The members of this list will be more than willing to help you, but we
are
not psychic.

I would be very interested in hearing more about what problem is being
solved here too.

On Thu, Mar 25, 2010 at 9:36 AM, Peter H. <

On 3/25/10, thunk [email protected] wrote:

http://gist.github.com/343358

I’m still trying to understand what you’re doing. Sometimes, your
verbiage reminds me of rinda, not that I know much about rinda either.
Your WhiteBoard might be like a Rinda::TupleSpace…? Perhaps you can
to compare and contrast the two?

Unfortunately, documentation on rinda looks kinda sparse… but maybe
this will help some:

http://ruby-doc.org/stdlib/libdoc/rinda/rdoc/index.html

SUMMARY
Everything seems to be just working for me, it has rapidly become
“domain specific” so I don’t think it makes any sense to post the
evolved versions, it will only be 10X more confusing :slight_smile: One day of
experience with it is not enough to say much more.

The GOAL
for me was to come up with a way for my “disposable” classes to leave
information into some sort of system with minimum overhead, no new
dependencies. Memory management is not an immediate need concern.
This has done the trick for me for now.

“All about ‘Boid’”, only semi-serious
Somebody with AI training here wrote that these things "probably
aren’t real Boids and I have to agree - at least technically.
However, since they are useless/meaningless alone, and follow simple
rules, and behave as a collection - they have reminded me of “Swarms”
months before I read up on official “Swarm Intelligence”. In the last
3 months I have bent everything around them - and even reselected a
domain where I see them as having particular utility. The term Agent
was used by IBM in a whole other context in the 90’s (as in autonomous
negotiating units) and I can’t help thinking of Maxwell Smart talking
into his shoe phone :slight_smile: .

I really I think they are more like “Dorts” - but they are likely to
take on new abilities and who really knows where Ruby can let them
go.

i am getting reports out already but i did’t like the way data was
getting shuffled around multiple times for lack of a persistent object
to post to during “flight”. oh no, the aircraft carrier analogy fits
on this too, uncanny, there is some “inflight” communication betw the
“pilots” and the ship. so far no need between the pilots - that
happins - in a minimalistic, but effective way by organizing multiple
“waves”.

BTW a friend sent me a picture of an impossible complex plane
supposedly of Soviet design and I had just read a spiegel article on
the end of WWII “disposable wooden jets” that the Nazi’s were hoping
would be a wonder weapon. The pilot, if he returned at all, only did
so by parachute. It didn’t work, overall, but the may have been ahead
of their time if you think about what electronics could have done…

anyway, i could not resist the comparison, and without further todo I
give my boid clue#18, and here are my speech opening slides for the
talk I don’t intend to give:

 Its much more not this:

     http://3.bp.blogspot.com/_iTGXYFIkfkA/SYMLhYAs2yI/AAAAAAAAQT8/qLPt8MuVDw8/s1600-h/Biggest_04.jpg

 than not this:

     http://gunpoint-3d.com/view-Natter.f.html

PS I meant to mention that I did a quick check to use Marshall Dump
and it does not play with the singleton stuff. PickAx 1.9, p421 I
have no immediate need for memory balancing or whatever yet, but the
pickAx book provides some examples on about the same page.