Quanta Magazine is a real treasure trove. The gem was at this time titled " To Make Sense of the Present, Brains May Predict the Future" (see this). The article gives links to various research articles: here I mention only the article " Neural Prediction Errors Distinguish Perception and Misperception of Speech" by Blank et al > (see this) .
According to the article, brain acts as a prediction machine comparing predictions with what happened and modifying the predictions accordingly. Sensory perception would not be mere 3-D sensory time=constant snapshot as believed in last century but include also a prediction of future based on it that would be outcome of sensory perception and brain is able to modify the prediction by using the difference between prediction and reality.
In TGD framework one can go even further (see this). Sensory organs are the seats of sensory mental images constructed by repeated signalling between brain (maybe also magnetic body) and sensory organ using dark photons propagating forth and back with maximal signal velocity and contributing to the sensory input a virtual part. Nerve pulses would create by synaptic bridges connecting flux tubes to longer flux tubes acting as waveguides for dark photons to propagate. Sensory mental image would be essentially self organization pattern nearest to the actual sensory input. The percept itself would be artwork, a caricature selecting and emphasizing the features of sensory input important for the survival.
The term predictive coding used about the process reveals that the view about how brain achieves this relies on computational paradigm. This is one possible view. Personally I do cannot regard classical computation as a plausible option. A more neutral view relies on rather obvious assumption that that temporal sequences of associations giving rise to predictions. But how does this happen?
Neuroscientists speculate about deep connections between emotions and learning: the dopaminergic neurons are indeed very closely related to the neural reward system. If the difference between the predicted and actually perceived is large the reward is small - one might also call it punishment. "Surprise" would be rather neutral word to express it. Big discrepancy causes big surprise. The comparison of predicted and what really happened would be essential. This is was one of the first predictions of TGD and might apply to simple emotions but - as I have proposed - emotions such as experience of beauty, compassion or love need not correspond to emotions need not be mere reactions.
The finding suggests a connection with the ideas about the fundamental role of emotions in learning. I have already developed this theme in this article.
Motor action would be generated by a negative energy signal to the geometric past which would correspond to mental images with reversed arrow of time in TGD inspired theory of consciousness. This duality would mean that in opposite time direction motor action would be a perceptions about say hand moving in desired direction! The counterpart of predictive coding would take care of comparisons and modifying the predicted "sensory percept" so that it corresponds to reality. This sounds strange but maybe the motor actions is just passive perception from the point of view of time reversed self!
See the chapter Emotions as sensory percepts about the state of magnetic body? or the article with the same title.