Next Generation LuxAgentSDK Thoughts

AI discussion, ideas, and SDK help.
Post Reply
User avatar
dustin
Lux Creator
Lux Creator
Posts: 10999
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Next Generation LuxAgentSDK Thoughts

Post by dustin » Wed Dec 01, 2004 10:59 pm

Right now when AIs send a chat it gets printed out as (for example) 'Nefarious (AI): blah'

Is this better or worse then (for example) 'Lux Luthor (AI): blah' ?

The second one could be possible, but it would require some additions to the AI SDK.

Also, it is possible to send events notifications to AIs so that they can do stuff with them. By events I mean: attacks, other game events, as well as chats and emotes. Is this desirable?

User avatar
Preacherman
Semiholy Priest
Posts: 4496
Joined: Tue Feb 24, 2004 3:52 am
Location: Sweden (capital of Denmark, an island in Norway, southern Europe)
Contact:

Post by Preacherman » Thu Dec 02, 2004 5:18 am

To be honest, I think it would be brilliant. I know it is not as immediately useful in the big scheme of things as other app feature requests, but it is one of those little touches that would make Lux more complete, and help developers (and you) produce more lethal AI in the future.

We'd still need a method to determine bot types as well, currently getAgentName, which would be better suited to getting the actual name, and maybe create a getAgentType to replace it.

/emote's would be a lot of fun, the ability to filter chat input would be awesome. Event handling would in theory allow more interesting and competitive AI to be produced.

Nice to have this topic for these discussions, I can add to it as we go...hopefully rip and his mysterious Ravitar will show up and add some input too :)

User avatar
Preacherman
Semiholy Priest
Posts: 4496
Joined: Tue Feb 24, 2004 3:52 am
Location: Sweden (capital of Denmark, an island in Norway, southern Europe)
Contact:

Post by Preacherman » Thu Dec 02, 2004 7:15 am

Here's something that I just remembered...might just be me, of course...but with some of the BoardHelper methods, you are returning arrays of country codes for example from cheapest cost paths. Is there any way of actually getting the costs themselves back that are associated with these arrays? At the moment I am having to rip the arrays apart again back inside Nef and make the calculations myself, for example to compare them to other costs of other paths.

For example if I am trying to plot the best route from me to one particular country, I can use the easyCostBetweenCountries method to return an array...but this assumes I know which of mine is the best country to attack from. Truth is, it is not always the closest, nor is it the one with the biggest army, etc. I need to get an easyCostBetweenCountries array from each of my countries to the one, and manually determine the cost of each array (which was already stored in BoardHelper just not returned) to find out which actually is the best path to take...

Edit to add : there is no cheapestCostBetweenCountries is what I am trying to say in my roundabout way...easiest is not always cheapest. And even with a cheapestCostBetweenCountries, you'd need the actual cost in order to compare cheapestCostBetweenCountries paths from each of your countries to determine which to attack from.

User avatar
dustin
Lux Creator
Lux Creator
Posts: 10999
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Post by dustin » Thu Dec 02, 2004 12:53 pm

This is quick and dirty written in the forums. A function to get the cost of an array of country codes. Stick it in Nef and then use it whenever you need to get the real cost.

Code: Select all

protected int addCostOfArray(int[] countryPath)
    {
    int total = 0;
    for (int i = 0; i < countryPath.length; i++)
        {
        total += countries[countryPath[i]].getArmies();
        }
    return total;
    }

User avatar
Preacherman
Semiholy Priest
Posts: 4496
Joined: Tue Feb 24, 2004 3:52 am
Location: Sweden (capital of Denmark, an island in Norway, southern Europe)
Contact:

Post by Preacherman » Thu Dec 02, 2004 2:02 pm

Thanks 8)

...was hoping for a cheapestCostBetweenCountries :P

User avatar
dustin
Lux Creator
Lux Creator
Posts: 10999
Joined: Thu May 15, 2003 2:01 am
Location: Cascadia
Contact:

Post by dustin » Thu Dec 02, 2004 4:16 pm

I admit that the whole concept of passing back arrays of ints is stoopid. If I could go back and redesign everything that it would result in a much more object oriented design. Such calls would return a CountryPath object which you could then get the path, cost, etc from.

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests