really basic framework for implementing AI, totally doesn't work yet