Socket AI concept
Posted: 31 Mar 2011, 04:08
In the future I'd like to look at what would be involved in separating each LuaAI into its own CPU thread. This led me to consider the possibility of writing a new "Socket AI" interface.
The concept is that it uses the existing C++ AI interface but instead of providing an actual AI it just opens a listening socket (or connects to a server) and passes commands and data across it using some common protocol like SOAP or JSON. I could then spawn AI as processes written in any language and even running on different computers from the one running Spring. I'd then port my LuaAI to run in a real Lua interpreter and communicate over LuaSocket. This would give me multhreaded LuaAI without solving the "multiple lua states" issues in the engine.
Just wondering what people think of the idea. I'm certainly not rushing to implement it as I'm now working on a LuaAI and other projects. I'm just putting it out there for people to consider. I think it might be something AI researchers would be interested in since they could use traditional languages like lisp or prolog without a new AI interface being coded into Spring. It would also allow closed source AI since there would be no linking to GPL code.
The concept is that it uses the existing C++ AI interface but instead of providing an actual AI it just opens a listening socket (or connects to a server) and passes commands and data across it using some common protocol like SOAP or JSON. I could then spawn AI as processes written in any language and even running on different computers from the one running Spring. I'd then port my LuaAI to run in a real Lua interpreter and communicate over LuaSocket. This would give me multhreaded LuaAI without solving the "multiple lua states" issues in the engine.
Just wondering what people think of the idea. I'm certainly not rushing to implement it as I'm now working on a LuaAI and other projects. I'm just putting it out there for people to consider. I think it might be something AI researchers would be interested in since they could use traditional languages like lisp or prolog without a new AI interface being coded into Spring. It would also allow closed source AI since there would be no linking to GPL code.