How does one make good AI

The one problem I always run into is how to make good AI
It seems that the restricted coding on this platform makes it harder to make good AI =(
Games that I need help with AI on:
http://www.flowlab.io/game/play/1155247 (enemy Battle Royale AI)
http://www.flowlab.io/game/play/1160254 (team deathmatch AI that will take random routes through the maze)
I know how to make the AI attack, it’s just that movement seems to be impossible for me =(

PLZ CAN SOMEONE HELP???
I mean, I have decent AI for the battle Royale, but the team deathmatch game is difficult =(
(I might just take the AI from the battle royale and adjust it a bit, will update on how it goes)