You are invited to Log in or Register a free Frihost Account!

Is Lua a suitable script for AI?

I accidentally found that some C++ programmers would like Lua Script as their Artifical Intelligence(or robot?) script. eg, QSanguosha

And minutes later I googled Lua, only to find that it's a light-weight scripting language made to extend other programming languages, with no extensions or libraries especially constructed for AI.

Have you ever experienced such a scripting language? As an AI script?
By the way, what advantages does it have according to your own experience?
I am not an expert at all about AI, so I've never seen Lua as an AI language.
But why would you need a library for AI? Shouldn't it just be switches and ifs?

In my experience, there aren't really advantages of using Lua over another language for the programmer. Python is more readable, Perl lets you make mistakes, Javascript is a standard.
However, it's useful to the program creator because it's lightweight and very customizable. It's useful for doing behaviors of things especially, which would make it good for AI, IMHO.

Depending on what you want to do, Lua might be just the language for you.
I think the biggest advantage of using a scripting language like Lua is that you don't need to recompile the program when you have made changes to the script. When making an AI you might want to test a lot of different settings to see what is best so avoiding the long compilation times of C++ could be worth it.

I don't know if Lua itself makes the programming of the AI easier (I have never used Lua). I guess some people would say so. Especially if they don't know C++. The programmer can decide what functions that should be available to Lua and I guess that could make a cleaner, high-level interface to use. All the low-level, time critical code can be implemented in C++ and used by Lua through function calls. That way the runtime overhead of using a scripting language will less likely be a problem.
Related topics
Which is your favourite weblog Script?
Chat script
Script Upload (obiefileman)
script backup database
Script run background
Can someone make me a php script?
target = _parent redirect script?
Help needed for mobile site
Cherche un script de téléchargment
je veux integrer un script php dans mon themes.
Script galerie
comment integrer le script googleadsense dans une page php
comment integrer un script dans une page php
Lua Scripting question
Reply to topic    Frihost Forum Index -> Scripting -> Others

© 2005-2011 Frihost, forums powered by phpBB.