detecting other agents sucessful attacks

AI discussion, ideas, and SDK help.
Post Reply
ladnir
Lux Newbie
Posts: 1
Joined: Thu Jul 11, 2013 9:24 pm
Location: portland, or

detecting other agents sucessful attacks

Post by ladnir » Thu Jul 11, 2013 9:37 pm

is there any way to tell if another player has taken a new territory or my real goal of seeing if they have been given a new card?

thanks.

User avatar
Lantern
Lux Superhero
Posts: 4072
Joined: Sat Jul 07, 2007 12:18 am
Location: Floating down the river
Contact:

Post by Lantern » Thu Jul 11, 2013 9:53 pm

Hi ladnir,

You can tell a few ways.

First when it is another players turn you will see the territory that they selected pulse with their designated color. If they take a new territory that will change color.

Second, in the information box it will tell you how many territories each player holds. That will obviously change if they gain a new territory.

Lastly, in the information box there is a column for how many cards a player has. Whenever a new territory is taken a player gets a new card.

(sometimes, rarely, a player may get a card without taking a territory but that is a glitch)

You can cash your cards with a minimum of 3 matching cards or 2 matching and a wild. Once you get to 5 cards a player has to cash.

Hope that helps

User avatar
paranoiarodeo
Semiholy Tyrant
Posts: 10421
Joined: Sun Jul 17, 2005 5:30 pm

Post by paranoiarodeo » Fri Jul 12, 2013 12:41 am

(Since this is the bots forum, and ladnir used the word "agent," then I assume he's asking how to determine the answer programmatically.)

http://sillysoft.net/sdk/

The included Javadocs will point you in the right direction. The board class includes a method for returning the number of cards held by specific players. You could extend that by comparing counts from one round to the next. Same goes for a list of countries owned by players too.

And, yeah, don't assume that a player will receive a card if he successfully conquers a country, or that he won't if he doesn't. Unfortunately, there's a long standing bug in Lux that can cause an attacker to not receive a card, or a non-attacker to receive a card, if the previous player waited until the last second of his round to attack, and there's network any lag between the player's computer and the host server. In order words, a card can and occasionally will "bleed into" the next player's turn. Best to use getPlayerCards() rather than comparing country arrays.

∞ paranoiarodeo waves his hands around ∞

Post Reply