If this is your article, you have a typo in learns_priority/3, "move_priority #> 0" should be "P #> 0".
Thank you!
Thank you!