<< Back to Warzone Classic Forum   Search

Posts 521 - 540 of 565   <<Prev   1  2  3  ...  14  ...  26  27  28  29  Next >>   
WarLight AI Challenge: 7/2/2014 08:30:37

GreenTea 
Level 60
Report
ok. it was just what I saw first of all when reviewing your code during 15 minutes :) Unfortunately have not much time to analyze AI algorithms, etc..
WarLight AI Challenge: 7/2/2014 19:59:17

{rp} pedrito 
Level 48
Report
We get extra cash for winning the institute prize :)
WarLight AI Challenge: 7/2/2014 20:30:37

{rp} pedrito 
Level 48
Report
Also here's the source for pedrito:

https://github.com/pedritoelcabra/pedritobot

It's messy and ugly. I need to be more organized and methodical for the next competition...

Note the four map-specific routines I had prepared but then disabled for the final version. They did reduce my performance. I should have left this one in though, now that I think about it:

    // catch a bot going for early europe - Blender!!
    if(($map_name == "small_earth") &&
            (!count($map->prov_in_bonus(6, $map->player_two))) &&
            (!count($map->prov_in_bonus(2, $map->player_two))) &&
            (!count($map->prov_in_bonus(6, "unknown"))) &&
            (!count($map->prov_in_bonus(2, "unknown"))) ){
        
        if(($round == 1) && ($map->regions[12]->owner == $map->player_one) ){
            toLogX("enemy going for europe... going for break!");
            $map->proposed_moves[] = new CMove(10, 5, 5, 12, 6, 12, 21, 0);
        }
        
        if(($round == 2) && ($map->regions[21]->owner == $map->player_one) ){
            toLogX("enemy going for europe... going for break!");
            $armies = $map->regions[21]->armies - 1 + 5;
            $weaker = ($map->regions[18]->armies < $map->regions[20]->armies ? 18 : 20);
            $map->proposed_moves[] = new CMove(10, 5, 5, 21, $armies, 21, $weaker, 0);
        }
    }


It needs some tweaking against the current version of Blender though because it seems that he now always takes one SA pick in addition to Europe.

Edited 7/2/2014 20:40:21
WarLight AI Challenge: 7/3/2014 01:59:01


Norman 
Level 58
Report
Hello

Very interesting bot. Pedrito always seemed the strongest bot analyzing the map and now I see that you indeed had some interesting ideas to predict the opponent moves and predict what is going on behind the fog. Also your sucker_punch is interesting.

I will take a closer look at your code.

Edit: The anti Blender code in action:
http://theaigames.com/competitions/warlight-ai-challenge/games/53b4be1b4b5ab20b42236dca
I knew your bot couldn't be 'that' good to dynamically go strong into North Africa instead of taking his bonus.

Edited 7/3/2014 02:42:10
WarLight AI Challenge: 7/3/2014 11:00:01

{rp} pedrito 
Level 48
Report
Sorry to disappoint you Norman, but that is not the anti-Blender code. It is indeed completely dynamical.

First of all, the anti-Europe routine is part of the hardcoded map-specific stuff that only was active for some days in May when I was trying it out. It has been disabled for the finals and still is, and it's only still in the source for reference.

At the beginning of bot.php:
$use_map_specific_strategy = ""; // No map specific stuff will be used

Second, it would ONLY work on turns 1 and 2, and ONLY when the enemy has no presence in either SA our Australia. So against the current version of Blender it would be completely useless.

Have a look at the logfile for this game to see what's really going on:
The first digit on the line is the turn number. I have left only the relevant parts.
...
1 opening move
1 1 of my good provinces have enemies adyacent: 10
...
1 reinforce:
1 joining up armies inside bonus Oceania(6)
1 proposed to transfer 1 armies from 42 to 41 (priority1)
...
2 opening move
2 going for attack!
...
3 hiding place Europe(3): 16 spare armies and needs 15 to complete bonus
3 initial stage is broken because we have expanded
...
3 attitude towards Europe(3): break
...
3 break proposed priority 8: deploy 0 - 5 at 12Brazil and attack 21North Africa
...
4 attitude towards Europe(3): get presence
...
4 proposed to destroy enemy at 18Western Europe, from 21North Africa (deploy 0, attack with 2) priority 6
...
4 increased attack amount of the only attack leaving 21North Africa
...
---------------------------

It hasn't always worked so well... but it makes me very proud when it does like in this case.

I know what some of you are thinking: "WHAT!! Thats hardcoded! Your bot is talking about Europe and all kinds of map specific stuff in the logfile!"

That's only part of the logging function. Yes, on any different map it would throw an out of bounds array error and I would have to disable that particular logging embellishment, but the actual gameplay decisions are not linked to any predefined values but made up 100% on the fly.
WarLight AI Challenge: 7/3/2014 12:30:40


Norman 
Level 58
Report
Hello

The new version of my bot (not online yet) also looks at missing opponent deployment to gain intel about the opponent bonuses before the opponent shows his newly acquired income. However my bot is much more careful with his assumptions than your bot is.
- My bot needs intel that the opponent has at least one spot in that bonus.
- I only consider missing deployment for the last 4 turns.
- If there are to much territories missing my bot doesen't assume the opponent took the bonus

First my bot was more bold with his assumptions but I ran into the problem of getting many false positives.
- The opponent might deploy in the background and move his stack to the front (often mathematically the better option when not getting first order)
- I could consider the amount of armies the opponent has visible to eliminate some missing deployment. However the opponent might also have lost some armies in a fight,... Is there even a way to tell how many armies the opponent lost in a fight? He might have lost armies in a fight and also transfered the same turn from the background to that region.

So what happened was stuff like my bot thinking that the opponent took Asia from Australia as I lost sight for a couple turns. What happened however was that the opponent built a huge stack to break Africa / South America.


I find it strange that your bot is able to tell Europe since he probably didn't lost a spot there. What is special about Europe?
- Europe has the best income / territory ratio?
- Europe is the only bonus that pedrito isn't bordering?
- North America / Asia take to long? Why then not Africa? Especially since Africa has less territories than Europe.



Edit: Looking at the thoughts of your bot, your bot is a 'macro bot' while SupremeDalek is a 'micro bot'. Your bot looks at the big picture and then calculates a doable and worthwile strategy to cope. SupremeDalek however is all about which regions are more worthwile than others without following any explicit strategy. That's why SupremeDalek plays so strong when stuff gets messy since he always knows what spots matter a little bit more than others.

Edited 7/3/2014 13:08:23
WarLight AI Challenge: 7/3/2014 14:14:45

{rp} pedrito 
Level 48
Report
Yeah I commented on this big difference between Dalek and pedrito some pages earlier. Dalek builds on territory values while pedrito builds on values from move-types.

I think your approach is indeed more solid and versatile, although my bot is definitely one of the tougher bots out there once the game breaks up.

I decided long ago that for the next competition I would include influence maps, so that information about territory value can be calculated each turn much like your bot does.

Why Europe? Africa and NA are visibly not owned by Blender, SA and Australia are disputed, leaves Europe and Asia. Europe is smaller.
WarLight AI Challenge: 7/3/2014 14:51:45


Norman 
Level 58
Report


Now look at that...
WarLight AI Challenge: 7/3/2014 20:30:24

GreenTea 
Level 60
Report
Photoshop..
WarLight AI Challenge: 7/4/2014 03:34:49


Norman 
Level 58
Report
Nope.
WarLight AI Challenge: 7/4/2014 05:11:01

Ikalgo
Level 50
Report
Norman, your bot is playing the same strategy as 4 other bots and each of them has been at #1 before. There's a lot of variation in (these settings of) Poker. Proper bots can only get roughly an estimated win ratio of 60-65% against an AlwaysRaise strategy in the current settings. Couple of hours later and you're on the #5 spot. Or are you just trying to encourage these guys to participate :D?

As for Blender: It's funny how Ad is now suddenly also playing Europe. I realized I removed the line which activates my SA strategy when I obtained < 2 regions in Europe. My SA strategy also includes a pretty good anti Europe measure ;). I might just add a version for that. I think if we would combine our methods (my method of defending and going for Australia, his expansion and killing off adequately), we'd get pretty close to an actual optimal Europe bot I'd say!

Have you guys ran some simulations by picking regions in Europe; I'd be really curious how your general bots would do it?

Edited 7/4/2014 05:14:59
WarLight AI Challenge: 7/4/2014 08:24:57

GreenTea 
Level 60
Report
"Have you guys ran some simulations by picking regions in Europe; I'd be really curious how your general bots would do it? "
I know for sure that it will not work for my bot, because if it is more then 1 turn to capture bonus (Europe in this case) then bot will prefere put armies to defend from enemy. And for now I can't see way to conclude in general way that capturing Europe is better then defending spot in SA for example. It should be some forecast of game on 3-4 turns ahead.

Edited 7/4/2014 08:27:48
WarLight AI Challenge: 7/5/2014 21:13:41

GreenTea 
Level 60
Report
WarLight AI Challenge: 7/6/2014 23:44:59


Trogatog
Level 52
Report
Here's the code that was used for Trogabot in the finals (I think):

https://bitbucket.org/trogatog/trogabotpublic

I made a branch from this to work on for future challenges, and I'm quite happy with 95% of the code.

Current changes include removing the stalemate code to be more dynamic (not specifically referencing North Africa) and the opponent income calculation method.

Most of what I'm happy with I hope that other players can use to benefit from:

Calculating attacks
Calculating defense
Stacking regions where opponent is about to interrupt income
Completing super region bonuses depending on income

In the GetAttackTransferMoves routine, I suspect about 50% of the code is unreachable at this point due to army attack/defense calculations taking priority, but you never know! (i.e. statements that say "if (fromRegion.AvailableArmies >= 100) {//then do something}" )

Anyways, enjoy :) I look forward to some good feedback from the other players out there!

Edited 7/6/2014 23:50:23
WarLight AI Challenge: 7/7/2014 10:27:08


Norman 
Level 58
Report
Hello

OK, let's try in some usefull criticism and not just in some Haha, my bot is more general than yours stuff.

I don't think you will get usefull criticism from people looking at your code because since it's lacking modularization it's to hard to read for non involved guys. Separate files like OpponenInfo.cs that have a clearly defined task are way easier to read than Trogabot.cs

In the past you topped the leaderboard for some time but at present you are struggling. Let's have a look why you are losing your games:

http://theaigames.com/competitions/warlight-ai-challenge/games/53ba57904b5ab20b4223dc8c
Africa can only come into play when the bot who is holding it blocks Brazil. Best play would be to stack in South America until you receive a stalemate and then stack enough in Australia until you have enough armies together to get a safe Australia break. As you faced elimination you let your bot get slaughtered. You bot should have tried to turn that lost game into a stalemate by running away. Some bots are very vulnerable to a run away strategy. Around round 30 the game is of course already lost but your bot is doing the mistake of not keeping his stack together, probably because he only attacks with the needed amount of armies. Just look at the terrible fight you run into round 31. I recommend to attack full force by default and when you are defending a valuable spot to add some carefully designed exceptions.

http://theaigames.com/competitions/warlight-ai-challenge/games/53b9c2124b5ab20b4223d09f
Turn one your bot uses his army inefficiently in South America. Look at
https://github.com/Norman1/SupremeDalek/blob/master/src/basicAlgorithms/IdealExpansionCalculator.java how I calculate the optimal moves to take a SuperRegion in one turn. In this game your bot should also have never stacked against me in Africa. There are some bots capable of playing South America, either because of hardcoded stuff (Herz, Gadzbot) or because they have a capable AI (AdsRiskbot). Neither Trogabot nor SupremeDalek are one of those bots. Pick 1+2 in Australia, 3+4 in South America and 5+6 in Africa. South America has following advantages over Australia:
- You can use your remaining armies form taking South America to fight in Africa. Those few remaining armies might allow you to win in Africa, especially if the opponent used to much armies to take Australia
- If the initial momentum from your remaining armies isn't enough to win in Africa you are probably closer to North Africa than your opponent and you can block North Africa. However if the opponent blocks North Africa and eliminated you from Africa then you lost.

Edited 7/7/2014 10:30:23
WarLight AI Challenge: 7/7/2014 19:19:13


Trogatog
Level 52
Report
I don't think you will get usefull criticism from people looking at your code because since it's lacking modularization it's to hard to read for non involved guys. Separate files like OpponenInfo.cs that have a clearly defined task are way easier to read than Trogabot.cs

I completely agree Trogabot.cs is way too difficult to read. I had intended on using a similar structure to what you use in Dalek in that I was going to separate all the place army moves and attack transfer moves routines into their own strategy pattern (if you look at the place army routines, they all have the same signature) with a decider class that would determine if it's better to expand, press, or hold.

But, alas, I ended up spending more time trying to figure out a better Warlight strategy than keeping my code clean. Next version will look SIGNIFICANTLY better. The Omaha bot I'm working on, I took a lot of precaution to not get into the jumbled mess that my bot class ended up in the Warlight challenge.
WarLight AI Challenge: 7/11/2014 14:58:19

{rp} pedrito 
Level 48
Report
So you guys think you can take on a bot?

Give it a shot!

http://elsocio.es/BP/index.php

There is no way to see any moves or deploys happening for now - only the resulting map is displayed each turn. But for the sake of fairness that information is not given to the bot either, he doesn't know any more than you do.

You'll have to excuse the raw interface too. I'll get around to improve it in time.

Ah, and luck is at 0% to avoid excessive frustration because you can't really see moves.
WarLight AI Challenge: 7/11/2014 15:20:40


NoobSchool (AHoL) • apex 
Level 59
Report


Edited 7/11/2014 15:21:01
WarLight AI Challenge: 7/11/2014 15:35:26


Timinator • apex 
Level 67
Report
rigged game, got 1,5,6 :X

new attempt with "normal" dist:



Edited 7/11/2014 16:05:32
WarLight AI Challenge: 7/11/2014 16:29:40

{rp} pedrito 
Level 48
Report
Congratulations both of you.

Nothing rigged about the distribution though, if both the bot and the player tie for a spot, its a 50/50 chance. And if you tie for the next spot as well, its 50/50 again. So technically if you take the exact same picks as the bot, there is a tiny chance that you get 4,5,6. And the same probability of getting 1,2,3.

Therefore it's fair. But if you keep restarting the game until you get the picks you want, and then play that and win, the game is rigged in your favour.
Posts 521 - 540 of 565   <<Prev   1  2  3  ...  14  ...  26  27  28  29  Next >>