Re: Whose Fish - OO solution




Kreeg wrote:
topmind wrote:
Jordan Marr wrote:
I never posted my solution to Whose Fish, and since my old thread
probably has a stigma attached to it, I'll post it here.

** SNIP Jordan's original post **

I was thinking of a way to make this problem more real-world instead
of textbook-puzzle-ish. One possible application would be crime
solving, or perhaps terrorist tracking. Data about people, places,
things, and relationships would all be in a data wearhouse and an
inference engine of some type could chew on it to find potential
trouble spots or leads. (Instead of "who has the fish", the
questions may resemble, "who may have a bomb".)


So, changing the nouns makes the problem more 'real world'? I don't buy
that. The problem was fine as it was IMO, and changing the nouns
around wouldn't really add anything.

You got me thinking. If you are doing a one-time or very specific
simulation, then perhaps you are right. That is pretty much what
Simula-67 was for, where OO was formally invented. They had tugboats,
freighters, and loading docks and wanted to test the productivity of
various scenarios. Simulations are certainly needed, otherwise
Simula-67 wouldn't have been made. Perhaps the type of problems Simula
was used for would be a better representation of a "real-world"
version of this kind of puzzle than my crime/terrorist finder
scenario. Being that I don't work on those kind of problems, I didn't
really think about Simula-bound-stuff until now.

However, my understanding is that simulation tools are becoming
graphical in nature such that one drag and drops widgets and puts
verious constraints on the visual "objects". There is coding, but it
is mostly for event-handlers (if-bumped, if-moved, if-within-X-units-
of-thing, etc.), not the framework itself. But I'll let a simulation
expert make an informed comment on that.


However, an inference engine would certainly be an interesting way of
solving the problem, I think.

Perhaps that would just be reinventing Prolog :-)


One change from your kind of solution is that specific instances would
not be hard-wired into the app code. Classification systems would also
not be hard-wired if we really don't want to make programmers
glorified data entry clerks. People, places, things, and categories
will be entered by domain experts, not programmers for the most part.

IMO, moving the noun definition outside of the hard-coded approach in
the example neither adds nor takes away from the solution itself. The
Sql approach that someone posted in the previous thread [1] was similar
to Jordan's approach in this way, in that both of them were 'hard-wired'
into the solution, as you say.

The most interesting piece of this problem IMO is not how the houses,
people, and streets get entered, but how the program goes about finding
the correct answer given sets of these things and a set of rules.

Again, It would be interesting to see a Prolog solution in the sense
you tell it the logic rules and then ask questions over those rules.


It always seemed to me that if you remove domain classification from
app code, the result will not be very OOP. There would be little or no
need for inheritence or polymorphism. If you disagree, I would like to
understand why, with perhaps some examples.


Heck, Jordan's solution has very little inheritance or polymorphism.
That doesn't mean I don't think it's a perfectly valid approach.

My comment was about the matter of being OO versus not being OO, not
necessarily "valid" or not. Jordan's solution is not that OO. It
mostly only uses encapsulation, not the other two. That is, the
operations and data structures are bound together in the OO "self-
handling-noun" way. Thus, on a continious scale, it has a fairly low
amount of "OO-ness" if you will. A "direct" procedural solution would
not be much different except that the data structures would be
"naked". (Whether this is good or not will take us back to the ol'
database versus app-RAM fights.)


[1] http://groups.google.com/group/comp.object/msg/cec9e241f760a89a

-T-

.



Relevant Pages

  • Re: Does robotic engineering have a place in strong AI research?
    ... > Electronic engineering ... Rodney Brooks is famous for saying "simulations are ... IOW, a simulation in a box is just that, a simulation in a box - and ... you have a something that actually works in the real-world. ...
    (comp.ai.philosophy)
  • Using CEP to determine random value
    ... I am creating a simple simulation using MS Excel. ... device provides an output value conforming to a CEP of 5 (e.g. 50% of ... getting lost as how to transform it into the CEP above. ... This is for a real-world job, ...
    (sci.stat.math)
  • Re: Pitch vs. trim in flight phases
    ... Steve Foley writes: ... including many real-world pilots--at least those with open ... minds. ... There is much to be gained from simulation. ...
    (rec.aviation.piloting)
  • Re: The Real Computer Hand?
    ... Gary Carson wrote: ... Pokerstove this afternoon, and through its calculations, Q5o seems to ... it's called the computer hand because in a simulation someone ran several years ago it wont the most hands. ... statistical programers, and simulation programmers. ...
    (rec.gambling.poker)
  • Re: Can I please have the 70s back?
    ... A circle on the screen bounced at a rate according to the gravity ... The vacuum tube computer was probably an analog computer. ... Programmers proudly ...
    (rec.motorcycles)