> I think that's the issue. Expecting your def-ed trantor to change once
> the world state has been updated is what would be expected in a world
> of pointers, OOP, etc. However, the new updated world (in my view) has
> a new trantor which you need to extract with your (get-actor ...).
>
> This wou
> The problem with identities of actors comes in when you consider code
> like the following:
>
> (def trantor (get-actor "Trantor" world-state))
>
> (:hit-points trantor)
> => 10
>
> (def new-world-state ((command "Trantor" :eat "apple") world-state))
>
> (:hit-points trantor)
> => 10 (s
On Oct 21, 9:04 pm, "Meikel Brandmeyer (kotarak)"
wrote:
> Hi,
>
> may I question the transitivity of state information?
>
> Maybe the world's state is that player "Trantor" is at position [15 34]. Now
> Trantor eats an appel. The appel is removed from his inventory and his
> health is raised by 5
> Maybe the world's state is that player "Trantor" is at position [15 34]. Now
> Trantor eats an appel. The appel is removed from his inventory and his
> health is raised by 5 hit points. Did the state of the world change? No.
> Trantor is still at position [15 34]. Does the world have to know abou
Hi,
may I question the transitivity of state information?
Maybe the world's state is that player "Trantor" is at position [15 34]. Now
Trantor eats an appel. The appel is removed from his inventory and his
health is raised by 5 hit points. Did the state of the world change? No.
Trantor is stil
> Are you arguing for my option b) then? In which case actors don't have
> distinct identities, they are just part of the overall world?
Not necessarily as your option b) already gives implementation details
(using ids to find actors, etc.). I was mostly thinking out loud to
see if anything emerge
On Oct 21, 4:25 pm, Ulises wrote:
> > c) Put actor identities inside the world state - nasty! now the world
> > state is mutable
>
> Not necessarily (and I'd be interested in the replies)?
>
> I mean, here's how I view it. If actors are part of the world, then
> they are part of its state.
> c) Put actor identities inside the world state - nasty! now the world
> state is mutable
Not necessarily (and I'd be interested in the replies)?
I mean, here's how I view it. If actors are part of the world, then
they are part of its state. Hence, when the state of an actor changes,
the
I'm a big believer in Clojure / Rich Hickey's principles regarding the
separation of Identity and State (http://www.infoq.com/presentations/
Are-We-There-Yet-Rich-Hickey) and how this is generally a good idea.
However I've recently been running into what seems to be a slight
conceptual challenge w