Jump to content


Scripting language for extensible AI


19 replies to this topic

#1 KoalaBear33

    New Member

  • Members
  • PipPip
  • 15 posts

Posted 22 August 2003 - 05:29 AM

Does anyone have any recommendations for a scripting language for extensible AI? Anyone done anything like that before?

In case you are not familiar, extensible AI simply refers to AI that can be extended by others (end-users). In other words, you implement an AI system in a scripting language so that the users/gamers can create their own AI and use it. A lot of games do that nowadays. Traditionally, people have created their own scripting language for the game. Nowadays, that is a waste and people use existing scripting languages.

So far, I have narrowed it down to Lua vs Python. Anyone use any of these? Lua is small, fast, and C-like, while Python is more easy to program (apparently) and has a lot of libraries.

KoalaBear33

#2 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 22 August 2003 - 05:41 AM

i'm not very involved in this..

i know lua works great, a friend of mine uses it and likes it..

on the other hand, python is known to work great, too..

test wich language you like more..

python is possibly more .. "mature" .. as it is a full shell scripting language in linux, or so.. dunno.. linuxfreaks out there, is that true? :D
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#3 KoalaBear33

    New Member

  • Members
  • PipPip
  • 15 posts

Posted 22 August 2003 - 05:54 AM

That isn't much help..you basically endorsed both of them ;) I'm actually running Linux but don't know much about Python. It is actually platform-independent (the game I'm working on is an opens-ource platform-independent one too). Since none of what I do is critical, I can try implementing both :) From what I understand LUA is around 5x to 10x faster (of course, depends on tasks) but I'm not sure how easy it is to write AI code using it.

KoalaBear33

#4 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 22 August 2003 - 06:16 AM

problem is, there cannot be much help. both are successfully used yet in games as far as know. both are simple languages. both integrate well into apis.

yeah, lua is possibly more fast.. then again, i don't know that by myself..

choose the one you like more..
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#5 hanzac

    New Member

  • Members
  • PipPip
  • 23 posts

Posted 22 August 2003 - 09:13 AM

Python is easy to be embedded.
& the point is that Python-dev is active now.

btw: ruby is also a wonderful one.
-- <span style='color:red'>Flame.Light()</span> --

#6 KoalaBear33

    New Member

  • Members
  • PipPip
  • 15 posts

Posted 24 August 2003 - 05:33 PM

hanzac said:

Python is easy to be embedded.
& the point is that Python-dev is active now.

btw: ruby is also a wonderful one.
Ruby seems a bit slower...although it isn't that much slower than Python compared to C/C++. Ruby is supposed to be more object oriented but is new and hence probably has less libraries. I'm just wondering if Python will have more useful libraries. It is going to be used for AI so if Python has some AI related stuff it would save a lot of time...

KoalaBear33

#7 rogerdv

    Member

  • Members
  • PipPip
  • 99 posts

Posted 25 August 2003 - 12:57 PM

Lua is fast and easy. The problem is the very annoying manual, but there is a very active mailing list with lots of gurus which helps when you need.
About integration, take a look at my very simple test apps.
There is a nice small AI there in the /userdata directory (each entity will try to kill another or defend itself using the adequate method according to its class).

#8 KoalaBear33

    New Member

  • Members
  • PipPip
  • 15 posts

Posted 26 August 2003 - 01:09 AM

rogerdv said:

Lua is fast and easy. The problem is the very annoying manual, but there is a very active mailing list with lots of gurus which helps when you need.
About integration, take a look at my very simple test apps.
There is a nice small AI there in the /userdata directory (each entity will try to kill another or defend itself using the adequate method according to its class).
Initially, after evaluating the scripting languages (including javascript, VBScript, etc), I was going to go with Lua for sure. Not only is the speed amazing (compared to the competition), it is C-like and hence easy for me. But the thing is that I want the users to program the AI. So I need something easy for the user. This is one reason I'm leaning towards Python.

I'll check out your stuff in the future. I'm not exactly at the point where I can embed the language yet. I need to work on some other stuff :(

BTW, why did you go with Lua? Is it because of the speed and small size?

If you want some performance figures, check this out:

http://www.bagley.org/~doug/shootout/

It is only theoretical tests but it gives a rough idea of the performance.

KoalaBear33

#9 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 26 August 2003 - 07:16 AM

is lua garbage collected? if not, i'd go for phyton (wich is, isn't it?)
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#10 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 26 August 2003 - 10:35 AM

it is
If Prolog is the answer, what is the question ?

#11 hanzac

    New Member

  • Members
  • PipPip
  • 23 posts

Posted 26 August 2003 - 11:02 AM

Python is one of my favourite interpreting & script language.
So I will continue to use it...
I just like it.
-- <span style='color:red'>Flame.Light()</span> --

#12 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 26 August 2003 - 11:52 AM

anubis said:

it is
uhm.. lua, or phyton, or both? :D sorry.. not clear from the answer:D
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#13 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 26 August 2003 - 01:31 PM

don't know about python but lua definetly is
If Prolog is the answer, what is the question ?

#14 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 26 August 2003 - 01:56 PM

okay.. thanks. as far as i know, phyton is, too..
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#15 farmerTom

    Member

  • Members
  • PipPip
  • 39 posts

Posted 28 May 2004 - 06:20 AM

From what little I understand .lua is a list language and is very good for carring user configs. It is also a good one for lightweight functions, and moniker like function for c++ .dlls.

If your really in it for a attachment to your primary engine just for passing and storing config data, lua......its free and a lot of other engines are using it.

Far Cry is one.

#16 spydaz

    New Member

  • Members
  • Pip
  • 1 posts

Posted 03 August 2004 - 08:08 AM

KoalaBear33 said:

Does anyone have any recommendations for a scripting language for extensible AI? Anyone done anything like that before?

In case you are not familiar, extensible AI simply refers to AI that can be extended by others (end-users). In other words, you implement an AI system in a scripting language so that the users/gamers can create their own AI and use it. A lot of games do that nowadays. Traditionally, people have created their own scripting language for the game. Nowadays, that is a waste and people use existing scripting languages.

So far, I have narrowed it down to Lua vs Python. Anyone use any of these? Lua is small, fast, and C-like, while Python is more easy to program (apparently) and has a lot of libraries.

KoalaBear33

View Post



I have started to build an AI >>> in visual basic>>> http://www.spydazweb...m/ftpspydaz/top secret/
the source and executables....

any IDEAS?

#17 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 03 August 2004 - 08:20 AM

why are you posting in this old thread ? asking for opinions on your AI belongs in it's own one...

anyway... probably you could give a short description of your AI before people start to play with it ?
If Prolog is the answer, what is the question ?

#18 Eul0gy

    New Member

  • Members
  • Pip
  • 3 posts

Posted 10 September 2004 - 10:39 PM

hey
have a look at angel script Angel Script

Its an up and comming script and seems to be gear to game dev , also there is a dedicated forum on the gamedev.net forums.

It gets updates regularly and u can ask for features straight to the developer on the forum .

And from what i hear it is quite easy to implement into C or C++ code .

Regards
Eul0gy

#19 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 10 September 2004 - 10:59 PM

we really need to implement the lock for old threads... this is becoming a drag

Eul0gy : nothing against you :) just don't post into threads that are well over a year old
If Prolog is the answer, what is the question ?

#20 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 12 September 2004 - 07:25 PM

woah devmaster is getting old.. :D
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users