version of the IDS search that uses trees and keeps its map-tree in the persistent state, updating it at each time step. also futz with the compiler to allow us to get the environment during initialization