<< Back to Warzone Classic Forum   Search

Posts 211 - 230 of 565   <<Prev   1  2  3  ...  6  ...  10  11  12  ...  20  ...  28  29  Next >>   
WarLight AI Challenge: 5/1/2014 15:43:39


ps 
Level 61
Report
looking at the code again now i think it's still missing some optimization to disregard evaluating duplicate neighbours or that have already been checked. not sure if it's bugged or not. have to test when i find the time.
WarLight AI Challenge: 5/1/2014 15:56:17


ps 
Level 61
Report
but going back to ant colony optimization, the algorythm is based on doing certain random moves now and again (letting some ants drift apart from the best path) in hopes of finding something better, evaluating that result and then use that certainty to decide to keep at it or not. Usually in a dynamic setting, where food will likely run out from one place, so you should already be investing on trying to find your next supply.

So for warlight expansion in itself it wouldn't really prove useful imho, but for certain decision heuristics it might:

Deciding to attack all possible enemy territories of 1 with 2 armies for example, some bots deploy on all enemy neighbours, while others focus deployment only on the most important strategic region, so it would be nice to have an adaptative model that tries something, measures how that went and if it did well it tries again, else tries something different.

Same goes for deciding where to deploy and to attack or not on the first turns for example.

This doesn't necessarily require ant colony optimization algorhythms per se. It's transversal to machine learning models and optimization algorythms.
WarLight AI Challenge: 5/1/2014 16:32:01


Trogatog
Level 52
Report
Here's a simpler way if you want to know how to get from point a to point b. Now, I expect all of you to hard code "Lose to Trogabot" for giving you this info :)

You'll want to start by adding a numeric property to Region called "MovesToOpponent":
public class Region
{
    public Region()
    {
        MovesToOpponent = int.MaxValue;
    }
    [...]
    public int MovesToOpponent { get; set; }
    [...]
}
Then put this in the function that is trying to figure out how to get to your opponent
foreach (Region region in /*the list of regions you suspect your opponent controls*/)
{
    region.MovesToOpponent = 0; //This is your opponent. 0 means his region
    IncrementNeighbors(gameState, region.Id, 1); //all of his neighbors are 1 away
}
Here's the method that does all the work.
private void IncrementNeighbors(BotState gameState, int regionId, int moveNumber)
{
    foreach (var neighbor in gameState.VisibleMap.GetRegion(regionId).Neighbors.Where(n => n.MovesToOpponent > moveNumber))
    {
        neighbor.MovesToOpponent = moveNumber; //set the neighbor's move number if it's less than what's currently on there
        IncrementNeighbors(gameState, neighbor.Id, moveNumber + 1);  //Recursion!!!
    }
}
It'll take a little work to fully implement that into your code, but I'm not giving everything away ;)

Share and enjoy!

-Troggy

Edited 5/1/2014 16:38:54
WarLight AI Challenge: 5/1/2014 17:14:59


ps 
Level 61
Report
wtf, just realized i'm number 2 today, shouldn't be, still isn't robust enough to beat the rest of you guys on a regular basis. weird. it's nice to notice the top 7 bots are all out of warlight though. seems i was wrong on my initial analysis that learning to play warlight would be easier for coders than leaning to code ai for warlight players. :)

Edited 5/1/2014 17:15:19
WarLight AI Challenge: 5/1/2014 18:18:45


Trogatog
Level 52
Report
I don't know wtf is up with the queue. I swear I watch everyone play at least 4-5 matches before I get queued up for one... Haven't been able to do much testing or debugging :( Also, my rank is barely moving anywhere since I can't get queued
WarLight AI Challenge: 5/1/2014 20:09:50

{rp} pedrito 
Level 48
Report
I use a simplified version of A* for pathing. Simplified as in: no estimated distance (H value) because the map is small.

Functions that use this pathing are:
- findNearestOwnedBy(start, owner) // to get to the enemy
- findNearestNotOwnedBy(start, owner) // to get out of my owned super-regions
- findPathTo(start, end) // to go break bonuses
WarLight AI Challenge: 5/4/2014 18:08:08


Trogatog
Level 52
Report
In case you missed it, this happened :)

WarLight AI Challenge: 5/4/2014 19:15:13


Norman 
Level 58
Report
Hello

Ah, yes, I saw you at 3000 points. I believe you also won a game that didn't give you any points against a 2500+X bot at your way.

What I see now with the top rated bots is that the fights get more and more like when humans play together. Humans don't take the whole board but they try to somehow gain a little income advantage or stack advantage and then they finish the opponent off. In the past my bot was the only one having the right idea about how to play the small earth map but now the competition is tougher. Trogabot wins his games by first trying to win in Australia. If he wins there then he is in the attacking position. Except for Gadzbot I don't know of any bots capable of playing South America. Most bots just stack in a random Africa spot giving a halfway decent bot a free win.

My last big attack was about 4 weaks ago with me completely changing the way my bot fights. I think I can spare enough free time for a next big attack. The times where one bot could completely dominate the battlefield are over though.

Edited 5/4/2014 19:16:35
WarLight AI Challenge: 5/4/2014 19:22:36


Trogatog
Level 52
Report
Trogabot wins his games by first trying to win in Australia

You're only 1/3 right. In our matches, yes, but that's because we have the same starting picks.

125ch209 uses such code (sorry, I peeked, was just curious) to pull off his counterpicks.
How do you have access to our code out of curiosity? Are you even eligible for the competition with such an advantage?

Edited 5/4/2014 19:36:25
WarLight AI Challenge: 5/4/2014 19:34:55


Norman 
Level 58
Report
You're only 1/3 right. In our matches, yes, but that's because we have the same picks.

That wasn't my whole statement ;). I also said that most (all?) bots don't know how to play South America. Here some random examples of when Trogabot get both his Australia picks and the opponent picks South America + Africa
http://theaigames.com/competitions/warlight-ai-challenge/games/53660f274b5ab235189fa76a
http://theaigames.com/competitions/warlight-ai-challenge/games/536694c34b5ab235189fb32c
http://theaigames.com/competitions/warlight-ai-challenge/games/536675484b5ab235189fb089
http://theaigames.com/competitions/warlight-ai-challenge/games/5365f4794b5ab235189fa522
WarLight AI Challenge: 5/4/2014 19:39:08


Trogatog
Level 52
Report
Ah, I see.

It's actually kinda funny because I initially designed my bot to be an aggressive SA bot (I actually still have a variable in my code called "saRegion" for one of my place army movement). The logic is still the same for starting in Australia and in SA though, although my rankings are significantly different :)
WarLight AI Challenge: 5/4/2014 20:25:20


Norman 
Level 58
Report
How do you have access to our code out of curiosity? Are you even eligible for the competition with such an advantage?

Ah no, I don't have access to you guys code. If I was able to peek the only thing that would really interest me is how pedrito manages to tell where the opponent expands.
http://www.youtube.com/watch?v=NlpRBLkgcBo
All other things in you guys bots are pretty obvious.

I traded JArs with 125ch209. I use his JAR to test my own bot with one of the GUIs someone posted at the forums. This is quite useful since Gadzbot plays differently than SupremeDalek. I was just curious how 125ch209 managed to organize his code since his bot does so well despite him asking those easy questions in the forums.
WarLight AI Challenge: 5/4/2014 23:17:09


Trogatog
Level 52
Report
Oh -- gotcha. I was actually kinda bothered when you said you peeked. Good to know that there's no other advantage :)
WarLight AI Challenge: 5/5/2014 06:07:28


ps 
Level 61
Report
added a nasty bug yesterday when doing an update, left the bot losing games all night, made it drop down back to 17th. Did a couple updates yesterday to fix that and a few more things, still slowly climbing up.

Slippery slope with bots of generic approach, you change a little something and it can influence in unpredictable ways, used to have mine stacking up and breaking into SA all the time, now it just disperses around on Africa trying to be smart but hitting enemy walls instead. :D
WarLight AI Challenge: 5/5/2014 06:42:56


ps 
Level 61
Report
am i the only one struggling not to rename my bot Anna?
https://www.youtube.com/watch?v=E7iU0GGVco8
WarLight AI Challenge: 5/5/2014 09:49:13

{rp} pedrito 
Level 48
Report
It's very tight right now in the top. Most games up there are decided by luck IMO. Every now and then the bots make an obvious mistake that a human player wouldn't, but most of the time they are competent.

I'd be surprised if anyone can take their bot to a next level.
WarLight AI Challenge: 5/5/2014 10:22:50


ps 
Level 61
Report
well, we have 20 days to find out :p
WarLight AI Challenge: 5/5/2014 12:32:26


Norman 
Level 58
Report
It's very tight right now in the top. Most games up there are decided by luck IMO. Every now and then the bots make an obvious mistake that a human player wouldn't, but most of the time they are competent.

I'd be surprised if anyone can take their bot to a next level.


TREMBLE.

Sometimes I see games where the winning bot just got plain lucky but the vast majority of defeats aren't necessary. Let's point out some easy to fix mistakes and skip those more tough ones:

Pedrito vs SupremeDalek:
http://theaigames.com/competitions/warlight-ai-challenge/games/5367642c4b5ab235189fc55b
Turn 4: Supreme Dalek takes Australia in one turn instead of defending South America
Turn 7: Unnecessary risk taking with taking Africa in one turn by Supreme Dalek
--> SupremeDalek got lucky in this game.

Trogabot vs psWarlighter:
http://theaigames.com/competitions/warlight-ai-challenge/games/536746814b5ab235189fc2cd
Turn 4: An 8v2 neutrals attack should happen before an irrelevant transfer move.
Turn 10: Same problem with psWarlighter doing his transfers first and then attacking the neutrals. Didn't have any effect though.
--> Trogabot lost because of his turn 4 mistake.

Trogabot vs KewaKareban:
http://theaigames.com/competitions/warlight-ai-challenge/games/5366e7744b5ab235189fba6b
During the whole game Trogabot reveals his problems with expanding efficiently. If the opponent had been smart enough to move towards the known opponent spots in Australia Trogabot would have lost. Turn 4 it was an easy win for KewaKareban.
--> Game not won on luck

pedrito vs RaptorBot:
http://theaigames.com/competitions/warlight-ai-challenge/games/536746124b5ab235189fc2c4
Pedrito knew the opponent had South America. The current version of SupremeDalek would have walked around the stack.
--> Unnecessara stalemate.

pedrito vs Trogabot:
http://theaigames.com/competitions/warlight-ai-challenge/games/5366b2114b5ab235189fb5d3
Unnecessary stalemate. If Trogabot had attacked that Africa spot he would have won.

Gadzbot vs Trogabot:
http://theaigames.com/competitions/warlight-ai-challenge/games/53673bd14b5ab235189fc1e0
Gadzbot is the only bot pulling off counterpicks at present.

I don't have a game at present but most bots just deploy to the opponent border instead of deploying to a bigger stack in the background and moving the big stack first order to the border.
WarLight AI Challenge: 5/5/2014 12:45:17


ps 
Level 61
Report
Most games up there are decided by luck IMO.


I'm obligated to agree.
http://theaigames.com/competitions/warlight-ai-challenge/games/536780a64b5ab235189fc81f
WarLight AI Challenge: 5/5/2014 12:49:19


ps 
Level 61
Report
counterpicking isn't very "smart" on this setup considering you only start with 2 armies on each territory and very likely bordering your opponent. you won't have time or income to surprise your opponent. that's what i concluded a month or so back. couple weeks ago i also concluded starting in australia with a foot in SA/Africa/Europe is usually better then being based in South America.
Posts 211 - 230 of 565   <<Prev   1  2  3  ...  6  ...  10  11  12  ...  20  ...  28  29  Next >>