Surprise and free energy minimisation? You may want to read this:
There has been a lot of work in this area.