Available playersTop players Chat Forum External sites: Wiki

«

previous 1 2 3 4 5 6 7 next

spadequack

Heavy Tank

Offline

It doesn't work?

java.io.FileNotFoundException: http://test.weewar.com/api1/gamestate/22

bert

Staff

Offline

Try again. Should do now.

spadequack

Heavy Tank

Offline

Ok, works fine for me now. You also changed city => Base, it seems.

bert

Staff

Offline

Regarding the feature request ...

I can understand that you'll want Eliza to provide such a service. It is a reasonable desire to have all game mechanics calculated by Weewar as changes to them are instantly available to all Bots as well.

Hmm. Interesting idea Spadequack. I can see that it is necessary to evaluate potential moves to make a good decision. There are situations with dozends of units on larger maps which have a lot of possible movement options. I am getting nerveous when I imagine a bot that would request weewar to calculate movement or attack options for hundreds of fields and then for the thousands of possibilities the opponent has. Calculating 3 or more rounds into the future would lead to thousands and thousands of necessary requests. Not only would this make your bot slow but it would also put heavy load on weewar.

It would be better for both ends to have those calculations done by the Bot. Take a look at coordinate class. It gives you the adjacent coordinates to any given coordinate. Starting from there you could to a deep search algorithm which calculates the movment options. Attack options are even easier as "getCircle( int radius )" in Coordinate.java gives you all Coordinates in the area of a unit. Combine these with the unit information at those coordinates and you have a list of possible targets.

If you are sharing the code (at least the framework and the basic methods), I am glad to help.

bert

Staff

Offline

Yes Terrains have been renamed as well.

This message was edited 1 time. Last update was at 30/05/2008 17:09:23

spadequack

Heavy Tank

Offline

Hey, what changed for eliza's getAttackCoords(int id, Coordinate from, String type)? It does not work anymore for me. Perhaps something happened when you changed type names?

For http://test.weewar.com/game/48
If I request this: <weewar game='43'><attackOptions x='5' y='4' type='Trooper' /></weewar>
I get this in response: <?xml version="1.0" ?><error>Malformed Number or missing value.</error>

This message was edited 1 time. Last update was at 30/05/2008 17:14:19

Pistos

Raider

Offline

Bert wrote:It seems to me that this is almost your standard state of mind




Would it be possible to get an update over at http://weewarwiki.com/tiki-index.php?page=Eliza+API ?

spadequack

Heavy Tank

Offline

Bert wrote:Regarding the feature request ...

I can understand that you'll want Eliza to provide such a service. It is a reasonable desire to have all game mechanics calculated by Weewar as changes to them are instantly available to all Bots as well.

Hmm. Interesting idea Spadequack. I can see that it is necessary to evaluate potential moves to make a good decision. There are situations with dozends of units on larger maps which have a lot of possible movement options. I am getting nerveous when I imagine a bot that would request weewar to calculate movement or attack options for hundreds of fields and then for the thousands of possibilities the opponent has. Calculating 3 or more rounds into the future would lead to thousands and thousands of necessary requests. Not only would this make your bot slow but it would also put heavy load on weewar.

It would be better for both ends to have those calculations done by the Bot. Take a look at coordinate class. It gives you the adjacent coordinates to any given coordinate. Starting from there you could to a deep search algorithm which calculates the movment options. Attack options are even easier as "getCircle( int radius )" in Coordinate.java gives you all Coordinates in the area of a unit. Combine these with the unit information at those coordinates and you have a list of possible targets.

If you are sharing the code (at least the framework and the basic methods), I am glad to help.


I didn't catch this before (you must have posted while I was posting and my post ended up on page 2). Indeed, there would be many requests to weewar if the bot were to calculate three or more rounds into the future. I guess this means if I want to do this still, it would mean quite a lot of coding. Movement options requires dealing with a unit's movement points, a terrain's movement cost, and ZOC. I guess it doesn't sound all that bad. Since Weewar already calculates it, is there any chance I can borrow some code? You can jar it up or something.

This message was edited 1 time. Last update was at 30/05/2008 19:40:24

ShadowPanther

Tank

Offline

Can someone post where I find these bots? I really want to play one XD I'm on the test server right now.

EDIT: I see. It's aiQuaker, right? am I allowed to invite it to play?

This message was edited 1 time. Last update was at 31/05/2008 15:03:44

spadequack

Heavy Tank

Offline

Start a game against aiZappBrannigan. I don't know if the Bot is running, but I think it is. Mine (aiQuacker) is not running at the moment, and I don't see a point to running it until the devs fix the bug that keeps the Bots from attacking. But if you want me to, sure.

This message was edited 1 time. Last update was at 31/05/2008 15:37:32

ShadowPanther

Tank

Offline

alright. Thanks.

Pluto

Raider

Offline

aiPluto is another bot (mine, in fact) and is online periodically. I will post in the test server's chat window when she (yes aiPluto is a girl... i figured we needed more of those around weewar ) is online. For now, she is only slightly different from the ZappBrannigan bot but will evolve in the future.

As for useful code, I think that a movement/ZOC algorithm for the bots would be nice. I would like to see that available to the community. I am also working on a Java port of my battle simulator which will be nice for bots to have. I will release this, or put it up on GIT (if that ever get's going) when I'm done.

This message was edited 1 time. Last update was at 31/05/2008 20:26:30

spadequack

Heavy Tank

Offline

At last, I have git working and have files uploaded. See http://github.com/spadequack/aiquacker/tree/master for java files that calculate probabilities for battle damage (helpful for figuring out conditions of whether a unit should attack some other unit). It is, in part, a port of bmaker's python code that calculates exact probabilities to Java. Just call BattleCalc.getProbabilities(8, "DFA", "Woods", 5, "Berserker", "Swamp", 2); to get an array of probabilities that a 5-Berserker that is standing on Swamp will have 0, 1, ..., 10 subunits left after being attacked by an 8-DFA standing on Woods that has an attack bonus (from previous attacks) of 2.

Specs.java is pretty much most of the information stored in the weewar specs page. I haven't checked whether I entered in everything correctly, but it works for the ones I used to test the BattleCalc against Pluto's Battle Sim.

Git is pretty nice but the italicized java comment font is pretty harsh on the eyes. Hope these files help.

This message was edited 1 time. Last update was at 31/05/2008 20:47:39

OldBay

Trooper

Offline

awesome, spadequack! you read my mind then

will check it out soon

spadequack

Heavy Tank

Offline

Didn't see your post until just now, Pluto. Perhaps we should collaborate (more), at least on useful code kind of things so we don't end up both writing the same code...

This message was edited 1 time. Last update was at 31/05/2008 21:02:08

previous 1 2 3 4 5 6 7 next