I had the same idea of coding the AI for this jam but didn't go for it cause it seemed too complicated. Your game requires some time to learn but I can only praise you for implementing this!
The only issue for me is how to get the right blocks of code. I had to play 5 times to get a "Shoot" block before dying. Seems to me come blocks should be already available at the beginning.