I made it without any tutorial so it can't be compared to real bots, but still I'm really proud of the outcome.
How it works
The AI loops for every pawn searching for the ones that can move.
Using function Math.random() it picks one of them, then checks possible XY directions and again chose one of them.
Finally using same random function, it chooses how many fields it will move and then will appear in this field.
However if the AI finds that choosen pawn can take a players pawn it will prioritize this move over moving in random field.
Second exception is when AI finds that its king is in danger, then it will try to move him.