Algorithms can't "implent free will". If an algorithm were given identical inputs, it would produce the same output every time.*
Likewise, your mind (which you correctly state is running an algorthm of some kind) will always react the same way if given identical inputs. If you could model the universe exactly as it exists at a particular point in time to infinite precision (and avoiding quantum effects of observing sub atomic particles etc), you could predict the future with 100% accuracy, provided you knew the laws of mathematics (and thus, physics, chemistry etc)
* Identical inputs includes the state of random number generators, time of execution and all other factors that effect the execution of said algorithm.