Come now ERP, it is possible to run a scripting language in less than 256k.
Now, shoehorning Perl, Python, TCL, etc into your engine probably won't result in heap optimality.
But a domain specific AI language, not meant to be general purpose, could probably be quite small, possibly not even context-free.
Alot of other algorithms, like bayesian nets, neural nets, decision trees, etc can be updated in a streaming manner if you do it right.
Traversing the environment is the big issue IMHO, but sufficiently localized datastructures could solve it. After all, when humans are pathfinding, we can't see through walls and around corners like some AI pathfinding algorithms.