Best OS for military class AI driven robots.

I am doing a side project where we use old PC computers to control very cheap AI driven robots. These robots should be able to carry out numerous tasks and will probably be Multi-purpose packs that can control any types of machinery or device systems.

I am leaning towards eCos as simple OS because it is the best and cheapest.

I am wondering if somebody know any better OS that is very small and very versitile and stable.

Many Thanks.