Dunno if it's true or if Dick was just trying to talk up his most acclaimed book, but he claimed that he actually wrote it while consulting the i-ching about what would happen next in the book.
Personally, I think he was just looking for a hype point, since the book, great as it is, isn't so drastically different from other Dick books that I'd believe he did anything substantially different to write it (aka benzedrine and isolation).