updated documentation
the AI algorithm code