Nice to meet you! Can you help me?

AI discussion, ideas, and SDK help.
Post Reply
Argo
Lux Newbie
Posts: 6
Joined: Thu Nov 22, 2007 8:14 am
Location: Rome

Nice to meet you! Can you help me?

Post by Argo » Thu Nov 22, 2007 9:07 am

Hi guys,
I’m Marco from Rome. I’m a new Lux member, so nice to meet you!

I've some questions about the development of AI features.
In sum, can you help me to understand how change:

1. (player info) “Name” of bot how I prefer?
2. (player info) “Type” of player to show always “human”?
3. speed of bots’ decision-thinking (both pre-attack and pre-defends) to simulate an human thinking in deciding strategies?
4. alliance between two bots in order to have two bots with the common goal (world conquest); anyway a bot might attack its team-mate to take up a specific area (e.g. to conquer the Australasia for gaining bonus armies)?

I’m novice in Lux development, so every feedback and suggestion from you are very precious for my work.

Thanx a lot!!

Argo

User avatar
rip
Luxer
Posts: 352
Joined: Wed Mar 31, 2004 10:22 am
Location: Vienna Austria
Contact:

Re: Nice to meet you! Can you help me?

Post by rip » Thu Nov 22, 2007 2:28 pm

Argo wrote:1. (player info) “Name” of bot how I prefer?
The name is set not by the bot, but rather by the human who is running Lux. So I have a Reaper, which was written by someone else, named "Grimm". When I set the game for playable via others over the Internet, since I'm hosting, the Reaper bot is named Grimm. You name your bot slots with the names you choose.
Argo wrote:2. (player info) “Type” of player to show always “human”?
Are you saying that your bot identifies itself as human? Unless you've declared your bot to be of type "Human" (ie,

public class Human implements LuxAgent
{
...
}

Hm. I wonder if that would work... Dustin?
Argo wrote:3. speed of bots’ decision-thinking (both pre-attack and pre-defends) to simulate an human thinking in deciding strategies?
That's simply a java wait statement (I'm not a natural born java programmer, I don't know what the Java statement equivalent to a 'wait' is). You would simply add wait-states of times that you feel are sufficiently 'human-like'.
Argo wrote:4. alliance between two bots in order to have two bots with the common goal (world conquest); anyway a bot might attack its team-mate to take up a specific area (e.g. to conquer the Australasia for gaining bonus armies)?
If you are using two robots of the same class, they should be able to share data using static variables (or whatever the Java equivalent is) ie variables which are common to the class, so each bot of the same class sees the same data. It's simply an array N deep, where N == the number of bots playing.

Like I said, I'm not a Java programmer, so I don't know what the 'Java specific terminology' is for the various things above.

I do wonder if you could have a "class Human implements LuxAgent" though.

rip

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

Post by dustin » Thu Nov 22, 2007 4:03 pm

Don't name your bot Human. It will break things.

Thread.sleep() is a java call to cause a delay.

Argo
Lux Newbie
Posts: 6
Joined: Thu Nov 22, 2007 8:14 am
Location: Rome

Post by Argo » Mon Nov 26, 2007 4:23 am

Thanx dustin.
dustin wrote:Don't name your bot Human. It will break things.
In your opinion is it possible to hide the "type" of gamer in the "player info" box?
At the moment, my purpose consists in developing an off-line scenario.
dustin wrote:Thread.sleep() is a java call to cause a delay.
Is this able for delaying the bot decision time?

dustin & rip,
thanx a lot for a great deal of your suggestions. I'm start to use them for changing the agent features.

--
Argo

Argo
Lux Newbie
Posts: 6
Joined: Thu Nov 22, 2007 8:14 am
Location: Rome

Post by Argo » Mon Nov 26, 2007 11:34 am

dustin wrote:Don't name your bot Human. It will break things.
Sure dustin, I've found a better procedure to avoide breaks and to hide the bot-type in the "player info". I changed the bot name in "Team enemy".

However, do you know where can I change the type "Human", for example for naming it as "Own Team".
dustin wrote:Thread.sleep() is a java call to cause a delay.
Thanx so much. I've used the string "try { Thread.sleep(2000);} catch(InterruptedException e) { e.printStackTrace();}" for 2 seconds dalying the bot actions.

It works!! :D

--
Argo

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

Post by dustin » Mon Nov 26, 2007 3:47 pm

You can't change the name of Human for Human players.

Argo
Lux Newbie
Posts: 6
Joined: Thu Nov 22, 2007 8:14 am
Location: Rome

Teamwork

Post by Argo » Mon Feb 04, 2008 12:27 pm

Hi guys,
can you help me? I'm trying to develop two team of AI. An “easy team” and a “hard team”.
With the aim at having a “hard team” I've modified the "BotOfDoom" AI.
Can you suggest me an "easy (or medium) bot” that implements a sort of "teamwork" class?
If this bot doesn’t exist, do you know a simple mode for weakening “BotOfDoom”?

Thanx very much!

Marco

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

Post by dustin » Mon Feb 04, 2008 2:40 pm

Communist and Trotsky both have some simple "don't attack other bots of the same type" behaviour.

Argo
Lux Newbie
Posts: 6
Joined: Thu Nov 22, 2007 8:14 am
Location: Rome

Post by Argo » Tue Feb 05, 2008 7:09 am

dustin wrote:Communist and Trotsky both have some simple "don't attack other bots of the same type" behaviour.
Thank you very much dustin!!

Argo
Lux Newbie
Posts: 6
Joined: Thu Nov 22, 2007 8:14 am
Location: Rome

log

Post by Argo » Fri Feb 08, 2008 9:16 am

Hi guys,
thank you for all suggestions for supporting my work.
I've quite completed of developing two bots (one easy and one hard level of difficulty) in order to have two team of bots with a quite-human behavior.

At this moment, I don’t have much information about the log capabilities of Lux.
In other words, if I host a game can I save a log file of the game to “capture” any movement of the players?
For example, when occur an attack from one territory to one other:
who player has attacked whom?
from which country to which country the attack is occurred?
how many armies have been used in the attack?
which was the result of the attack?


I’ve red the log information in the chat-box but I didn’t understand them. Moreover, I’ve tried to save a game and to open the “.luxsave” file in Word; there were many information but I did not understand their meaning.
Can you help me in understanding the “log” functions of Lux?

Thanx so much!

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

Post by dustin » Fri Feb 08, 2008 3:09 pm

Look at the code in Angry.message() for examples of getting notified when your bot gets attacked, and chat.

Post Reply

Who is online

Users browsing this forum: No registered users and 61 guests