Summary: [RFC] AI interface using lua
                 Project: Freeciv
            Submitted by: syntron
            Submitted on: Samstag 30.10.2010 um 00:26
                Category: ai
                Priority: 1 - Later
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 



I did implement the authentication system in lua using luasql. Doing this I
through about the current AI implementation:

At the moment the AI interface is defined via ./common/ai.(ch),
./server/aiiiface.(ch) and ./ai/defaultai.(ch). Only this interface should be
used to access the AI. To create an independent AI implementation work is done
to remove all dependencies of ./server on files of the AI (./ai). Therefore,
the advisors are separated into ./server/advisors.

Considering the frequently expressed request to create a scriptable AI, this
interface can be change to an lua interface. For each AI player a lua state
is created and, in the beginning, the above discussed functions are defined
as entry points from freeciv to the lua. This functions in turn only call
back to the AI definitions in ./ai. In time, the some lua function can be
implemented, doing some general AI work, while the main part (or the work
load) is still be done in c.

- scripting of the AI
- different AI's

- speed
- indirective calls (c => lua => c)
- yet another interface, why not finish the current?

This is nothing I will work on at the moment but is a nice idea what could be
done with the current lua implementation.



Reply to this item at:


  Nachricht geschickt von/durch Gna!

Freeciv-dev mailing list

Reply via email to