<< Back to Warzone Classic Forum   Search

Posts 451 - 470 of 565   <<Prev   1  2  3  ...  12  ...  22  23  24  ...  26  ...  28  29  Next >>   
WarLight AI Challenge: 2014-06-06 15:32:03


Trogatog
Level 52
Report
For the most part, Trogabot is hard-coded in two places: Determining your income (previous post) and my effort for the last two weeks to figure out how to handle stalemates.

The only reason the latter is still hard-coded is because I didn't have enough time in the last few weeks of this competition to flush out the logic to identify regions such as North Africa as being extremely important no matter if you're holding AU or SA. I have some ideas, but until the next competition, I don't really have much interest to pursue fixing it at the moment.

There is still remnants of old hard-coded decision that never get called, but with Trogabot being in the top 5 for as long as it was, I didn't want to start ripping code out (just in case!) until after the finals. For example, I put attributes on enums that hard-coded different attributes for each region:

public enum RegionNames

{
[Ranking(2)]
[StrategicRegion(true)]
NorthAfrica = 21, //engine ID for NA
...
}

and super regions:

public enum SuperRegionNames
{
...
[Ranking(1)] //South America was always my first choice rank
[PickRank(2)]//but picked after AU
SouthAmerica = 2
}

Region ranking and strategic region originally were identified manually, but turned into coded out statements so that the attributes were never needed. I devised ranking out of # of moves to opponent and # of surrounding regions and my own mathematical table to decide. Strategic Region was any region that bordered another super region. Probably should add that into the ranking system now that I'm here talking about it.

I'd really love to sit down with some of you guys and discuss strategy. If it's one thing I lack as a player, it's that. How does everyone determine what to do early game when you're stuck up against an opponent with 2 or 3 regions?

Late game I've really done my best to make Trogabot shine, although in the version that was up, it seemed to want to conquer everything once it had the advantage (yes, that's a bug). Trogabot should be using the army advantage, and taking out the opponent big stacks.

I'm hoping we have a playground up soon! I sure did have fun coding and trying new things!
WarLight AI Challenge: 2014-06-06 22:11:59


Norman 
Level 59
Report
Last games were as clear as I expected:
- Blender easy victory against Speedy2014
- TheeYo easy victory against mweb
- Gadzbot easy victory against SupremeLeader

Next matches Blender -- TheeYo -- Gadzbot will be more interesting. Both Blender and Gadzbot have very strong hardcoded stuff while TheeYo is a more dynamic bot. As for me I would rather fight TheeYo than Blender or Gadzbot. This is however more to the fact that TheeYo isn't just sitting you out at a strategic position and plays the game at my conditions. If I had to bet I would bet on Blender and TheeYo to make it but it's close.
WarLight AI Challenge: 2014-06-06 22:20:42

GreenTea 
Level 60
Report
How does everyone determine what to do early game when you're stuck up against an opponent with 2 or 3 regions?


Lets assume situation, that GreenTea bot at start has 2 reagions near to enemy: first in SA, second in Africa.
Third region in Australia, enemy is not visible (but bot know that enemy here by analyzing picks).

Then algorithm works something like this (not only in early game):
1) For my regions near to enemy calc it startegic value. For visible enemy region also calc strategic value.
For SA it would be higher.

2) For every region pair, where first region is my and second is enemy, calc average scores (*) of attack and defence using income from 0 to myIncome, considering
that enemy could also attack or defend using his income from 0 to enemyIncome.
Also during average scores calculation some suicide attacks are skipped (for example no sence to attack by 5 region with 20 etc) because they give big information noise.
Scores of attack/defence is depends much from strategic value of region calculated on step 1.

3) For every possible distribution of income
[
0 1
0 2
...
0 5
1 0
1 2
...
1 4
...
...
5 0
]
found those which gives maximum average scores for all region near enemy.
During this process also found what is better for every region to attack, defend or make some strategic move.

* - maximizing of average scores gives that bot usually place not all 5 armies in one region like SupremeDalek does.
In version next after v63 I maximize not average scores but value
0.4*averageScore + 0.6*maxScore

where maxScore is max score of one of regions. So bot should more to focus on one region, then spread income on all regions.

So after all of this, we have that for some first N turns bot usually try to defence in those 2 region.
But using of income cost some score -> this leeds to that when stacks are big - bot understand that put all armies on defence has no big sense
and better to save income (incresing defence scores become less then scores of used income).
And this free income is using to create stack in Australia, which then will move towards hidden enemy.

Edited 6/6/2014 22:39:39
WarLight AI Challenge: 2014-06-06 22:42:09


Norman 
Level 59
Report
Hello
maximizing of average scores gives that bot usually place not all 5 armies in one region like SupremeDalek does
Well, then SupremeDalek probably follows different algorithms.


So after all of this, we have that for some first N turns bot usually try to defence in those 2 region.

I assume 'score' is an abstract value. However if you border the opponent in say Australia and Africa then Africa is completely unimportant and winning there means nothing. You need to achieve a situation where you have enough armies to attack the other bot in Australia. That's why the only reasonable move is to deploy all 5 to Australia. If the opponent deploys 3 to Australia and 2 to Africa then you have 7 to 5 stack advantage in Australia. Next turn you attack him with 11. If the opponent deploys all 5 to Australia then you kill 6.6 and the opponent kills 7. However if the opponent gets a bit unlucky or deploys also say 1 to Africa (and doesen't get lucky) then it's pretty much game over and you won.
WarLight AI Challenge: 2014-06-06 23:42:24

GreenTea 
Level 60
Report
I tried to make 1 score equivalent to 1 army. But differend scores comes from different sources, and calculated by different formulas (strategic score of region, scores of expanding, score of using 1 income etc) and it is challenge to measure all this different stuff in armies. Probably in this space there possible a lot of improvements in my bot.

You are right about Australia. As I said it could be fixed by maximizing not average but reather max score of region, and also maby I should review and improve strategic scores calculation for region, to give in regions like Africa much less scores then in regions like Australia.

Bot has a lot of math, and sometimes changing one constant could give huge improve of game power. Always need some intuition and luck to find such places ^^

Edited 6/6/2014 23:47:57
WarLight AI Challenge: 2014-06-07 00:04:31

Ikalgo
Level 50
Report
I'd like to add to Norman's statement: I hardcoded to place 5 troops initially on SA for indeed that reason.

The next turns the kind of optimization GreenTea talks about comes into play for me. It will try maximize value of each troop by determining how much a placement of a troop will lead to increased % in defense, but only if the maximum possible placements still left for a region can reach a certain threshold (e.g. don't bother to defend if probability to defend is lower than 50% were we to place all remaining troops). This means that it will not try to reinforce regions that have no chance of surviving anyway.

Also, I do these kind of optimizations within clusters of strategies. For example, I would optimize between all regions that have an opponent and are lonely in a super region. Another one is the regions of an owned supercontinent that have enemies near them.
So basically I optimize within these conditions rather than overall.

After these defensive moves have been made, my bot would consider the value of placing a troop for attacking purposes; the place where it will give the highest increase in probability to break successfully in the future will be placed first.

Note that these optimizations are not linear, but also allow, say, placements of 5 troops at once because placing 1-4 troops increase 0 probability increase, but the 5th troop does add probability, then 5 troops will be placed.

The main problem is that around these mechanisms I have some hardcoded forced placements. I have not made those play as nicely together yet, but I guess I should have considered a more general approach to include those.

GreenTea: I agree with your problem of finding constants approach. This is the reason why I prioritize the strategies, and optimize within the strategies such that I don't need a constant other than probability thresholds (some strategies like defending I allow to take place several times with higher probabilities each time). Both your and my approach have ups and downs.

Edited 6/7/2014 00:17:56
WarLight AI Challenge: 2014-06-07 04:11:59


Norman 
Level 59
Report
Hello

@Trogatog:
I'm hoping we have a playground up soon!
What do you mean?

@Ikalgo:
After these defensive moves have been made, my bot would consider the value of placing a troop for attacking purposes
Attack first should be better if you aren't defending a valuable spot. Else you will always lose to a halfway decent player no matter how much you optimize your algorithms. Just imagine a game without bonuses (just base income) and where all territories are randomly assigned to either you or the opponent. Then you want to form big stacks and try to kill more opponent armies than you lose each turn. This is also the reason that SupremeDalek adds that annoying +5 instead of evenly spreading out his armies. Given that all spots are relatively unimportant then in my oppinion you should only defend a spot if you don't need the armies for an attack and the opponent will lose more armies than you when you defend there.

Edit: That defending two spots isn't a good strategy can also be shown by following example. Let's say you border the opponent in Australia + South America. Then you add randomly 2 to one spot and 3 to the other spot while the opponent attacks randomly one of those spots full force with 6 armies. No matter if the opponent hits the right spot he will always kill on average more armies than you.


Edit 2: Thinking a bit about it I see following possible opening strategies:
Here are the opening strategies and which one they counter. Say you border the opponent in South America and Australia:
- Strategy 1: Place 2 on spot A and 3 on spot B. (A and B random)
- Strategy 2: Place all on spot A and attack --> Always wins against strategy 1.
- Strategy 3: Place all on spot A and don't attack --> Is always stronger than strategy 1 since you have the initiative after first turn. Also is better than strategy 2. If the opponent attacks the wrong spot he loses more armies and if he attacks the right spot you can easily crush him second turn.
- Strategy 4: Place 2 armies on spot A and 3 on spot B. Attack with the 2 spot (not with the 3 spot). This strategy loses against Strategy 1. However it kind of counters especially strategy 3 since if you guess right you will probably have enough to defend next turn.

As you see the strategy 1 that you are performing is only strong against a strategy that nobody ever tried out.

Edited 6/7/2014 05:59:33
WarLight AI Challenge: 2014-06-07 22:01:37


125ch209 
Level 58
Report
Blender versus TheeYo
Match Winner Rounds Score
1 TheeYo 50 0-1 Review match
2 Blender 33 1-1 Review match
3 TheeYo 32 1-2 Review match
4 TheeYo 33 1-3 Review match
5 Blender 26 2-3 Review match
6 TheeYo 21 2-4 Review match
7 Blender 35 3-4 Review match
8 Blender 59 4-4 Review match
9 Blender 33 5-4 Review match
10 Blender 23 6-4 Review match
Winner: Blender

Blender versus Gadzbot
Match Winner Rounds Score
1 Blender 32 1-0 Review match Show output
2 Blender 21 2-0 Review match Show output
3 Gadzbot 33 2-1 Review match Show output
4 Gadzbot 37 2-2 Review match Show output
5 Blender 32 3-2 Review match Show output
6 Blender 80 4-2 Review match Show output
7 Blender 22 5-2 Review match Show output
Winner: Blender

TheeYo versus Gadzbot
Match Winner Rounds Score
1 Gadzbot 30 0-1 Review match Show output
2 Gadzbot 32 0-2 Review match Show output
3 Gadzbot 66 0-3 Review match Show output
4 Gadzbot 40 0-4 Review match Show output
5 Gadzbot 34 0-5 Review match Show output
Winner: Gadzbot


whouhou!! i'm shocked but these results, i was expecting to lose against TheeYo and maybe have a shot against Blender
WarLight AI Challenge: 2014-06-07 22:03:39


The National Socialist
Level 54
Report
Noobs
WarLight AI Challenge: 2014-06-07 22:15:24

Ikalgo
Level 50
Report
Going to the finals this was indeed way unexpected for me as well Gadzbot! Grats though, and it seems we will play against each other again immediately. I really feared you given that our record was 10-5 in the qualifications. Now all taken together, you still have favorable odds with 12:10, so I'm still hoping that the qualifications were just extremely unlucky for me ;)

Edited 6/7/2014 22:16:01
WarLight AI Challenge: 2014-06-07 22:20:00


125ch209 
Level 58
Report
congratz to you :) i had terrible record against TheeYo... and yet i won 5-0, and remember the finals are best of 5, not best of 9 like semi finals, so really anyone can take #1
WarLight AI Challenge: 2014-06-07 23:23:46


Norman 
Level 59
Report
and remember the finals are best of 5, not best of 9 like semi finals, so really anyone can take #1

For sure not Damian_Warlight and Muli. The other bots should have a realistic chance while some need a lucky punch. I watched some of Gadzbot games against TheeYo and Gadzbot had some very strong moves which I thought I had only seen by GreenTea so far.
http://theaigames.com/competitions/warlight-ai-challenge/games/538c7b394b5ab23cee6dbd77
The deployment in Australia and suprise attack there is strong.

The strongest pairup in the competition so far should happen in the next game where pedrito faces AdsRiskbot. As far as I checked both bots are playing the game and not just hardcoded sit the opponent out in North Africa. That should promise interesting games.
WarLight AI Challenge: 2014-06-08 11:06:54


Green 
Level 56
Report
If I remember correctly Pedrito is the only one with a positive record against AdsRiskbot, unlucky for AdsBot perhaps but I can't say I'm disappointed. Of course I want a Warlight player to win.
WarLight AI Challenge: 2014-06-08 11:37:44

GreenTea 
Level 60
Report
13/6 in favour of AdsRiskbot in qualifications vs pedrito.

Edited 6/8/2014 11:38:01
WarLight AI Challenge: 2014-06-08 11:50:15


125ch209 
Level 58
Report
I have a positive record of 16-7 against adsriskbot... Too bad i won't play him :)
WarLight AI Challenge: 2014-06-08 11:57:41


Green 
Level 56
Report
Maybe I was thinking of Gadzbot then.
WarLight AI Challenge: 2014-06-08 18:12:40

jim
Level 2
Report
It's on!! Finals have started! Aaaand the crowd is going nuts *cheer*
WarLight AI Challenge: 2014-06-08 18:25:49


125ch209 
Level 58
Report
gogogo!!
WarLight AI Challenge: 2014-06-08 19:02:45

Ikalgo
Level 50
Report
Good luck Gadzbot! Wow, pedrito was not playing his best for sure :/
WarLight AI Challenge: 2014-06-08 19:06:25


125ch209 
Level 58
Report
go gadzbot!!

Edited 6/8/2014 19:06:44
Posts 451 - 470 of 565   <<Prev   1  2  3  ...  12  ...  22  23  24  ...  26  ...  28  29  Next >>