Page 1 of 1

Python artificial intelligence

Posted: 01 Jun 2012, 11:43
by prandipadaro
Hello everyone. I intend to write an AI in python.
What is the current status of python interface for the development of artificial intelligence? E 'can still use it?
I tried to download it and compile it by following this guide:https://github.com/spring/Python but maybe something wrong.This guide is updated and complete?
I'm not very handy, but I would try to achieve something for the spring engine.
thanks

Re: Python artificial intelligence

Posted: 01 Jun 2012, 13:27
by hoijui
the interface would need to be updated (the code) to work with spring 83.0 and later, so it is not compatible with current releases.
alternatively, you might be able to use JPython through the javs interface.

Re: Python artificial intelligence

Posted: 01 Jun 2012, 15:37
by AF
You could also remove the lua VM in Shard, and reconfigure SWIG to generate python not lua bindings

Re: Python artificial intelligence

Posted: 01 Jun 2012, 17:14
by gajop
As someone who has written an AI in python & C++ for starcraft, and a java one for spring, I suggest you use the java version. The python one is probably too complicated for you to setup as you're probably a spring novice - at least it won't be worth your time.

Re: Python artificial intelligence

Posted: 01 Jun 2012, 22:44
by prandipadaro
I will try to understand what is the best way, if there is one really better. I hope ... thanks again!

Re: Python artificial intelligence

Posted: 03 Oct 2012, 04:56
by hughperkins
I'd be interested in being able to use a python interface for spring AIs. I know that loops in python are terribly slow, but for playing around that does not matter, and many things can be vectorized using scipy.

Re: Python artificial intelligence

Posted: 08 Nov 2012, 02:27
by abma
@hughperkins:

fix the interface?

https://github.com/spring/Python :)

sorry, i'm / was to lazy to fix it. TheGeorge did the party which generates the code and this party is really ugly and can/could be written in a much cleaner way, thanks to the changes in the interface.

i guess it could be fixed in maybe one day or so... but my python-c-interface knowledge is really low.

if you've questions i maybe can help...

Re: Python artificial intelligence

Posted: 08 Nov 2012, 20:15
by PicassoCT
Would it be possible to have AI-Tournaments, with comentators and such? Every first of the month?

Sorry if derail.

Re: Python artificial intelligence

Posted: 08 Nov 2012, 21:17
by gajop
PicassoCT wrote:Would it be possible to have AI-Tournaments, with comentators and such? Every first of the month?

Sorry if derail.
there's already a springgrid site that does that
hughperkins has created the original version, and i also did some work on it - i just feel it requires a couple of more commits before being released (better interface & some code cleanup mostly), haven't yet gotten to it

check this ancient thread: http://springrts.com/phpbb/viewtopic.php?f=15&t=24218 (the instructions on the first post are old, suggest reading stuff from the last post or just check the repos)

PS: Eventually I'd like to combine springgrid and the mission editor thing I'm working on, so people can test AI changes, spring changes and mod changes on both skirmish and scenario settings - scenarios can f.e be used to test certain pathfinding improvements/regression bugs

Re: Python artificial intelligence

Posted: 09 Nov 2012, 14:55
by hughperkins
All sounds good to me. I'm busy doing a masters at the moment, and trying to publish papers, and nothing I'm doing is related to spring unfortunately :-( but I look forward to seeing what gets created, and you never know, maybe one day I can figure out how to get papers out of working on Spring :-)