
For those who are new here, I built an AI in C# a few years ago, for TASpring. http://springrts.com/wiki/AI:CSAI
I'm feeling the 'itch' to have an AI I can play with again. I learned a number of lessons last time.
AIs are basically not used unless they can be delivered as part of the binary releases. Anything too far from being non-standard renders this difficult to impossible. Anything which requires compilers other than C++ on the build box renders this difficult to impossible.
I'm thinking of building a new interface that will allow AIs to be written in Python.
Python is fairly widely distributed. For example, it is part of the Ubuntu default build, at least from Hardy onwards, which is a good year or so.
This contrasts with C#.Net, which doesn't even run on linux, and mono, which is potentially patent-encumbered, and Java which doesn't come by default, at least not the jdk, and the jdk is fairly heavy to install.
I'm thinking of possibly rewriting my generators that were in C# before in C++, and using xml as an intermediate parsing language, ie parse the Spring globalai header files et al into xml, and then use those xml files as the basis for generation of appropriate c++ <-> python interfaces.
In the past it was really hard to specify the AI to use from the Lobby interface, when one had multiiple C# AIs, since they all went through the same intermediate dll. I think maybe I'll have some way of creating tiny wrapper AI dlls that handle loading the appropriate python script somehow, maybe based on their name , on an xml file, something like that.
Python is quite cool as far as release distributions go, since the python scripts can be released with the distribution without being compiled, since they are interpreted later, so there is no need for some kind of python compiler on the build box. This contrasts with both Java and mono, for which this would be potentially a blocking point for their being included in the releases.
Python is not as fast as java or c#, but it's not too bad. It has the advantage of being fairly concise, fairly easy to write, fairly widely known and available, and not patent encumbered. It's fairly lightweight, compared with installing the jdk or mono-devel.
So, this is just a statement of my potential interest in this. This post is to obtain feedback on:
- ideas and concepts expressed above
- possible tweaks to implementation / execution, compared to ideas expressed above
- how does this idea fit into a world where lua AIs are possible? Are there Lua AIs now? Will there be in the near future (1-3 months, let's say) ?
- what about the java / oo AI interface? What is the situation with that? Is it operational or near operational (>= 99% operational let's say, since 90% operatoinal is in practice about 40% operational most likely

- other thoughts / concepts / ideas?
Remember that it's easier to influence the direction of such an interface before I've written a single line of code, than once I'm half way through, or once I've started to think through implementation in detail.
Hugh