Register | Sign In


Understanding through Discussion


EvC Forum active members: 60 (9209 total)
3 online now:
Newest Member: Skylink
Post Volume: Total: 919,442 Year: 6,699/9,624 Month: 39/238 Week: 39/22 Day: 6/6 Hour: 1/0


Thread  Details

Email This Thread
Newer Topic | Older Topic
  
Author Topic:   Percy's Alife Project
Peter
Member (Idle past 1730 days)
Posts: 2161
From: Cambridgeshire, UK.
Joined: 02-05-2002


Message 38 of 63 (60401)
10-10-2003 6:48 AM
Reply to: Message 1 by Percy
10-06-2003 6:59 PM


Memory efficiency
You don't need to store 10^18 of anything.
You only need sufficient memory to store all of the objects
in your univers (which could be large, but not as large as
the universe itself).
Instead of defining a temperature across your univers you need
to locate heat sources within the universe and calculate temp.
at any location via some radiant heat function (incorporating
heat absorption by other objects).
Each object has a place in the univers, rather than each place
in the univers has an object.
Physical charateristics are functions of the objects present.

This message is a reply to:
 Message 1 by Percy, posted 10-06-2003 6:59 PM Percy has not replied

  
Peter
Member (Idle past 1730 days)
Posts: 2161
From: Cambridgeshire, UK.
Joined: 02-05-2002


Message 39 of 63 (60402)
10-10-2003 6:50 AM
Reply to: Message 35 by NosyNed
10-09-2003 1:39 PM


Why OO ?

This message is a reply to:
 Message 35 by NosyNed, posted 10-09-2003 1:39 PM NosyNed has not replied

  
Peter
Member (Idle past 1730 days)
Posts: 2161
From: Cambridgeshire, UK.
Joined: 02-05-2002


Message 40 of 63 (60404)
10-10-2003 7:11 AM
Reply to: Message 26 by Parasomnium
10-08-2003 5:53 AM


As i said in a previous post -- it's not a 3d array that
you are running through -- it's an object list each of
which has a 3d coordinate.
The universe doesn't exist -- it's just the space that objects
occupy.
I used to write text adventures when I was a kid, and had
two separate mapping techniques one very specific (like exit
to the north goes to location 4 etc.) but also had
infinite deserts and forests all within a single location.
Special actions/objects were then related to locations within
the infinite space within a single location object.

This message is a reply to:
 Message 26 by Parasomnium, posted 10-08-2003 5:53 AM Parasomnium has not replied

Replies to this message:
 Message 41 by Dr Jack, posted 10-10-2003 7:21 AM Peter has replied

  
Peter
Member (Idle past 1730 days)
Posts: 2161
From: Cambridgeshire, UK.
Joined: 02-05-2002


Message 42 of 63 (60408)
10-10-2003 7:52 AM
Reply to: Message 41 by Dr Jack
10-10-2003 7:21 AM


I assume you are referring to processing efficiency ...
Using a cellular universe means that no matter how many objects
exist within it it takes a broadly similar time for one cycle
and takes as much memory regardless of density.
Viewing the universe as a space which has objects in-it means
you only have to store the objects, and iterate over them for a
single cycle.
Can't quit see the efficiency problem -- unless it's about locating
adjacent objects....
It's a tradeoff between memory and processing speed (as ever)

This message is a reply to:
 Message 41 by Dr Jack, posted 10-10-2003 7:21 AM Dr Jack has replied

Replies to this message:
 Message 43 by Dr Jack, posted 10-10-2003 9:18 AM Peter has replied

  
Peter
Member (Idle past 1730 days)
Posts: 2161
From: Cambridgeshire, UK.
Joined: 02-05-2002


Message 47 of 63 (60698)
10-13-2003 7:23 AM
Reply to: Message 43 by Dr Jack
10-10-2003 9:18 AM


I see the problem .... would it help if you re-ordered
your object lists based somehow on coordinates though?
Then you only have to check for proximity rather than
adjacent ness and the re-ordering goes in the movement overheads.
Moving on an object-by-object basis would require at most
swapping two array (say) locations per movement.
...not sure you could do it with a 3d grid ... hmmm ...
Maybe still too much though depending on data structures
(and language constraints).

This message is a reply to:
 Message 43 by Dr Jack, posted 10-10-2003 9:18 AM Dr Jack has replied

Replies to this message:
 Message 48 by Dr Jack, posted 10-13-2003 8:54 AM Peter has replied

  
Peter
Member (Idle past 1730 days)
Posts: 2161
From: Cambridgeshire, UK.
Joined: 02-05-2002


Message 49 of 63 (60715)
10-13-2003 10:30 AM
Reply to: Message 48 by Dr Jack
10-13-2003 8:54 AM


You could narrow the number of objects to search,
eg by distance from a set-point in space,
and while I see that it would always be slower, you
could have an 'infinite' universe in finite memory.
Depends which might be the more useful ....
Slower assuming that the time to check an empty cell
is negligable. If you have 10^18 cells and it takes
10^-8 secs per cell ... never really thought about this
before so I won't be offended if I'm way off in my thinking
[This message has been edited by Peter, 10-13-2003]

This message is a reply to:
 Message 48 by Dr Jack, posted 10-13-2003 8:54 AM Dr Jack has not replied

  
Peter
Member (Idle past 1730 days)
Posts: 2161
From: Cambridgeshire, UK.
Joined: 02-05-2002


Message 52 of 63 (61149)
10-16-2003 6:24 AM
Reply to: Message 50 by Percy
10-14-2003 10:59 AM


Just another thought on the environment model ---
do you need to wrap at each extremity of your cube or
should some be boundaries ?
Depends what you are modelling I guess.

This message is a reply to:
 Message 50 by Percy, posted 10-14-2003 10:59 AM Percy has not replied

  
Newer Topic | Older Topic
Jump to:


Copyright 2001-2023 by EvC Forum, All Rights Reserved

™ Version 4.2
Innovative software from Qwixotic © 2024