Python artificial intelligence

Python artificial intelligence

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
User avatar
prandipadaro
Posts: 98
Joined: 19 Oct 2011, 22:38

Python artificial intelligence

Post 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
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Python artificial intelligence

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Python artificial intelligence

Post by AF »

You could also remove the lua VM in Shard, and reconfigure SWIG to generate python not lua bindings
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Python artificial intelligence

Post 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.
User avatar
prandipadaro
Posts: 98
Joined: 19 Oct 2011, 22:38

Re: Python artificial intelligence

Post by prandipadaro »

I will try to understand what is the best way, if there is one really better. I hope ... thanks again!
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: Python artificial intelligence

Post 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.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Python artificial intelligence

Post 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...
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Python artificial intelligence

Post by PicassoCT »

Would it be possible to have AI-Tournaments, with comentators and such? Every first of the month?

Sorry if derail.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Python artificial intelligence

Post 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
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: Python artificial intelligence

Post 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 :-)
Post Reply

Return to “AI”