Tag Archives: simulation

“Revelation Space” by Alastair Reynolds


<WARNING: spoilers ahead>

Starts out great.  This is a summary of the first 50 pages:

  1. A space archaeologist, Dan Sylveste, is excavating an extinct starfaring civilization (the Amarantin) from 900,000 years ago; assisted by consultations with a simulation of the conciousness of his dead father (Calvin); embroiled in planetary politics and a rebellion.

  2. A massive, virtual ghost ship, the “lighthugger” (almost, but not quite as fast as light) Nostalgia for Infinity, crewed by just a handful but with thousands of empty cryocells, overtaken by computer viruses and in one case a cancerous fungal form overtaking the Captain’s cryocell; armed with planet-killer “cache weapons.”

  3. A world with “Shadowplay”, entertainment where daredevils hire professional assassins to try and kill them, with the resulting chase being captured by the media.

All together, an interesting semi post-Singularity future roughly 500 years from now.  The three threads, one each for the main characters Sylveste, Volyova (weapons officer on the lighthugger) and Khouri (a Shadowplay assassin), quickly come together.  A shadowy individual, the Mademoseille, hires Khouri to kill Sylveste; Volyova unknowingly recruits Khouri onto the lighthugger – bound for Resurgam, the Amarantin world Sylveste is investigating.  Meanwhile, there is a runaway entity loose in the lighthugger’s computers called Sun Stealer which had its own agenda.

The middle of the book kind of bogged down, sadly.  Maybe too many unexplained motives and weird happenings that only make sense after the big reveals?  Not sure I can articulate why I got kind of lost and bored…

Turns out the plot involves the solution to the Fermi Paradox – intelligent life does routinely arise throughout the galaxy, but is fairly quickly wiped out by a race called the Inhibitors, created in the aftermath of the first great, billion-year long, intergalactic war.  Thus was the fate of the Amarantin … but not before they sealed themselves off inside “Shrouds”, impervious shells of weird physics which can’t be pierced by anything.  Turns out Sylveste visited one and was infected by the Amarantin Sun Stealer; his companion in a sister ship died but was possessed by a different Amarantin entity … the Mademoseille.  These entities represent rival factions – the Sun Stealer is wants to use Sylveste to bring humanity to the attention of the Inhibitors to see if they are still an operational threat (if not then the Amarantin in the Shroud can come out of hiding) while the Mademoseille doesn’t think this is a good idea.  Both manipulate and infect the decision making of all the main characters throughout the story.

Finally there is a giant neutron star computer thing, origin unexplained but not a product of any race or species involved in the story.  Kind of a plot hole?  Maybe some explanation in later books.  Sylveste ends up in here, living as a simulation.  There is definitely a theme of making copies of oneself – either living as a simulation (Calvin, Sun Stealer, Mademoiselle, Sylveste inside the neutron star computer) or totally taking over another’s body (the Captain into Sajaki, Calvin’s unrealized plan for Dan Sylveste).


Smart Dots, version 0.2 – Orbit Point, Improved PID Control

In this update, I was confusing myself with (0,0) being in the upper left corner of the screen, so I changed it so that (0,0) is at the center.  No noticeable effect on the actual sim, but makes thinking about angles and things a little easier (for me).  I also implemented the orbit point functionality – pretty easy because it uses the already created MoveToPoint function.  I wanted to make the dots automatically space themselves evenly out along the orbit by speeding up if there is a dot close behind or slowing down if another dot is close in front, but couldn’t get it to work very well, so left that bit commented out.

I also redid MoveToPoint to be a better example of a PID controller.  (I tried to implement the diagram found here, fig 6.7.)  The gains now are set good enough for the default max velocity and acceleration; probably would need retuning if those are changed.

Download: smartdots_v0.2.zip.  Prerequisites are Python and Pygame.  Main script to run is smartdots.py.  Controls are listed in the status area above the dot box; also run with the -h option to see all other command line options.

I’m not really sure where smart dots will go from here.  “Avoid obstacles” is unimplemented, but after that I’m kind of out of ideas.  It’s not really a game… I guess the “game” portion of this project was for me getting the dots to do what I want them to – it was kind of fun watching them move and orbit a point.  (If you turn on orbit point, then move the action point around, there is some interesting behavior as the dots move while rotating…)  But for now “development” on Smart Dots will probably be on hold, unless I can think of somewhere to go with it.

Smart Dots, version 0.1

My latest project is not quite a game.  (Not yet, at least.)  But it is kind of fun to play around with.  Smart Dots is a simple, physics-based simulation of a multi-agent system – each agent is autonomous, has a limited view of the system, and is decentralized.  For Smart Dots, this means that each dot contains its own kinematics equations and behavioral algorithms, each dot only can “see” a limited distance away, and there is no higher level logic controlling what goes on.  (The only thing the higher level UI and “world” classes do is set dot behaviors.)

When the smartdots.py script is run, you will see several dots bouncing around in a window.  They each have their own velocity, assigned randomly at the start of the simulation.  The user can select a dot to see its position (pixel location), velocity (pixels/sec), and acceleration (pixels/sec^2).  There are several inputs the user may enter:

  • Left click on a dot to select it (the selected dot will turn green.)  Then, by pressing F2, the “Search and Follow” behavior is enabled.  The dots will start to follow the selected dot, if they can “see” it (ie, if it is in what I call in the program the “comm range”).  If the selected dot is traveling sufficiently slower than the others, then they kind of dance around it.
  • Right click on any spot of the window to set the “action point” (designated by a yellow point).  Nothing will happen unless F4 is pressed and the “Move to Action Point” behavior is enabled for the dots.  The dots will then move to the action point.
  • p will toggle pausing for the simulation
  • c will toggle a display of the comm range for each dot (displayed as a red circle)
  • s will “scatter” the dots, giving each one a new random velocity
  • the mouse wheel can be used to apply positive or negative gravity
  • Escape will cancel any gravity settings

I have place holders for adding an “Avoid Obstacles” behavior (avoid other dots), and also an “Orbit Action Point” behavior…to be completed in a future version.

Rather than a single screenshot, check out this youtube video I made of Smart Dots:

What is so cool about Smart Dots?  Well, it’s not much right now.  But I think it can be an interesting framework for testing out simple multi-agent algorithms…and just maybe it can be useful in a future game.  We shall see….

Download: smartdots_v0.1.zip.  Prerequisites are Python and Pygame.  Main script to run is smartdots.py.  Controls are listed in the status area above the dot box; also run with the -h option to see all other command line options.