There are many algorithms in machine learning that seem to fit your formal definition, but don't seem to produce anything useful when you analyze them in your model. Hill climbers or SGD are a good example of this. If you add an oracle for determining that you are at the global optimum, a hill climbing algorithm can be run until it finds a local optimum, then thrown into an infinite loop in which it stays in place. It only actually terminates at the global optimum. Even when run on a simple curve like $\sin(x)/x$ it is possible for the algorithm to never find the global optimum. Additionally, your algorithm could enter a "transfinite loop" where, although no individual run of the algorithm loops, running it starting with $x$ converges to $y$ and running it starting with $y$ converges to $x$.