These are three themes from a book I am desperately trying to recall...

For the last 15 years or so, every few months, I get a desperate yearning to identify a book I read as a kid whose story has stuck with me ever since, but whose title / author I can never remember or rediscover.

I'm hoping that given the brief synopsis below someone somewhere might be able to help me out - any help very much appreciated!

From what I remember the below is briefly what happened:

There is a guy who is doing experiments around running time in different directions in a simulated reality environment. Having created a high-level simulation of his consiousness he runs it in a simulator but chops and changes the time ordering of the simulation (runs time backwards, out of order etc. etc.) to see if the simulated consciousness notices which it doesn't. There is some question as to who is the simulation and who is simulating.

Somehow there is an end of world type scenario and he & friends decide to create this infinite computing matrix based on patterns in space and von neumann machines which he & friends "escape" into as these high-level simulations as the real world dies off (can't remember the details).

In addition to the simulator which runs them (which works using a heuristic / statistical approach to conscious simulation as opposed to simulating everything from the lowest-level up) they also initialize a separate compute space with a "low-level" simulator which simulates a seeded world at a very detailed atomic / quantum and thus they were hoping would end up creating life "spontaneously".

The book ends with there being a conflict between the insect-type life that spontaeously evolved in the low-level simulation vs. the humans in the other simulation.

Clearly this is a pretty basic brief overview, and I read the book about 15 years ago, so not that clear in my head!

Anyone who thinks they know the book, please let me know!

Thanks very much,
Adam