That was written in the v1.14 days though, so AI changes (if any) since then are not considered. Oh, and code blocks are suboptimally themed at the moment, but hit that "select" button and it should be readable.
Assuming v1.14 AI:
For critters without an ability, he'll consider rewinding them once his hp is less than 20*(atk+1). For critters with atk 1 or less, he might not rewind them anyway.
For critters with an ability, he'll rewind them once his hp is less than 20*(atk+4).
He would of course need a Rewind and enough quanta as well...