<< Back to Programming Forum   Search

Posts 21 - 40 of 52   <<Prev   1  2  3  Next >>   
The Cowzow AI is now available: 2016-03-06 01:36:27

Fizzer 
Level 64

Warzone Creator
Report
Here I'm doing the fixes to Wunderwaffe.

Cool! I'm glad you're working on it.

You're right I had to remove the FogRemover stuff. I also had to change the picking scheme a lot, since of course picking works completely differently.

Both of these changes had to be made when moving from TheAIGames framework to WarLight's. In TheAIGames, it told you where your opponent started, so it was reasonable for a bot to be able to guess and get a pretty good idea of what the map looked like behind the fog. Wunderwaffe took advantage of this, rightfully so, and kept a "fogless" map. When I went to port it to WarLight, I couldn't think of a way to maintain the same feature so I ended up removing it.

Both Cowzow and Wunderwaffe are being used in ways they weren't designed, so it's understandable that their behavior may not be ideal for the new world they're being thrown into.

It's also entirely possible I broke something when porting them over. I also fixed a few bugs that I found in Wunderwaffe's java version (let me know if you're interested in what I found).

Also, I was profiling other bots so I decided to profile Wunderwaffe to see if there was anything that could be improved. I found it was spending 40% of its time in the BotBonus.DistanceFrom function. That's a lot!

I looked over DistanceFrom but I didn't see any easy way to optimize it, so I looked at how it was being called:


var distanceFromUs = bonus.DistanceFrom(...);
if (distanceFromUs > 2)
...


DistanceFrom was spending a lot of time calculating the exact distance across the entire map, but all the caller really cared about is "is the distance greater than two?". So I was able to make an easy fix: DistanceFrom now takes a "max" integer, and if it exceeds the max, then it stops searching. Then the caller just passes a max of 3.

I just checked this in. I recommend applying it if you want to see a drastic speed increase.
The Cowzow AI is now available: 2016-03-06 03:49:36

Fizzer 
Level 64

Warzone Creator
Report
I played the bots against each other with the standard test settings, with the exception that I removed the fog. Their current results are a 12 -2 win rate of Wunderwaffe vs cowzow.

Wow, you're right, removing the fog changes the results a lot. Here are the simulations I just ran:

50 fog games: Wunderwaffe=7, Cowzow=43
50 no fog games: Wunderwaffe=44, Cowzow=6

Wunderwaffe is really crippled in fog games. Obviously, it was written under the assumption that FogRemover had removed the fog, so removing that changes everything.
The Cowzow AI is now available: 2016-03-06 08:43:06


GeniusJKlopp
Level 61
Report
Just to ask one thing:

Can AIs use cards in team games?
The Cowzow AI is now available: 2016-03-06 10:04:50


Lucarr10
Level 55
Report
Also, which language is the AI programmed in (I assume C#)?
The Cowzow AI is now available: 2016-03-06 10:05:36

wct
Level 56
Report
Theoretically, yes, but Prod only uses reinforce cards, and the ones for the AI competition didn't have any cards to use, so I doubt any of them know how to play them (reinforce wouldn't be difficult to implement, tho).
The Cowzow AI is now available: 2016-03-06 11:42:11


GeniusJKlopp
Level 61
Report
I ask for the old ones (bcs of one game)

Edited 3/6/2016 11:42:20
The Cowzow AI is now available: 2016-03-06 19:39:21


muddleszoom
Level 59
Report
can we have it so the ai takes it's go last (so it does not steal the cards off people and does not pick the same territory as a player
The Cowzow AI is now available: 2016-03-07 05:57:21


Word Walker 
Level 68
Report
I'd be interested to know how to use it. The only explanation I saw referred to the method used for other AI's, which I do not know.
The Cowzow AI is now available: 2016-03-07 12:38:22

SwAtteR
Level 58
Report
This current default warlight AI has a big bug !

He don’t any move in a game with no income (i mean a game with setting basic armies per turn zero)…. however he have several army but he don’t any move without any income at the start the game and after that …

Need someone enhance it
The Cowzow AI is now available: 2016-03-07 13:38:30

J_Dog33340 
Level 58
Report
so by any chance would it be easier to modify the one on warlight over the ones off of the AIGames
The Cowzow AI is now available: 2016-03-07 16:44:39

talia_fr0st
Level 59
Report
I meant which account can I play to go up against Cowzow, like AI ServerBot for Wunderwaffe.
The Cowzow AI is now available: 2016-03-07 16:53:37


Norman 
Level 58
Report
@Word Walker

When you just run the exe file from the release you won't get cowzow since Fizzer hasn't updated it. You have to download the code and build it yourself.

1) Install visual studio + C#
2) Download + unpack the source code
3) In visual studio open the project, something like open --> project --> reference csproj (or similar)
4)Click the run button. This should automatically create your WarLight.AI.exe file in bin / debug. Since this exe file was created from the source it also contains cowzow.
5) The easiest way to use the exe file is to open a console and then pull the exe file into the input (so you don't have to write out the path). You then get a list of the available commands.
6) To play against yourself I recommend creating a 1v1 game and inviting the AIServerBot. After that let the AI join your game via the console.

Edited 3/7/2016 16:55:37
The Cowzow AI is now available: 2016-03-07 16:59:23


Lucarr10
Level 55
Report
follow fleeces link on the previous page to see the blog post
The Cowzow AI is now available: 2016-03-07 20:06:56

Fizzer 
Level 64

Warzone Creator
Report
Can AIs use cards in team games?

Sure, AIs can be written to play cards in the same restrictions that humans do.

Also, which language is the AI programmed in (I assume C#)?

An AI can be written in any language, but the ones in the linked github repo are written in C#.

can we have it so the ai takes it's go last (so it does not steal the cards off people and does not pick the same territory as a player

The current production AI checks if it's teamed with a human. If it is, it'll never play cards unless it's forced to. It could only be forced to if cards must be played that turn, and it's the last to commit. It can only be the last to commit if the last player to commit in a team is booted or surrendered into an AI.

Having an AI "go last" is really problematic. If a human player is playing slow, how do you ensure the AI doesn't get booted? What if a human commits 5 seconds before the boot time. The AI was waiting since it wanted to go last, then it can't commit in time.

Even if that were solved, I don't think it would be any better. Your idea presumes that an AI is good at picking based on a teammate's picks. However, none of the current AIs are, and I don't believe that they could ever be done to be better than a human could if the human is picking after looking at the AI's picks.

This current default warlight AI has a big bug !

He don’t any move in a game with no income (i mean a game with setting basic armies per turn zero)…. however he have several army but he don’t any move without any income at the start the game and after that …

Need someone enhance it

The current AI was written to work well in the six single-player levels. Given WarLight's flexible engine, it would be very difficult to make an AI that works well in all settings and situations. If you encounter a situation where it doesn't work well and want to fix it, feel free to fix it in the code and submit a pull request.

so by any chance would it be easier to modify the one on warlight over the ones off of the AIGames

It may indeed be easier to improve the Prod AI rather than working on Cowzow or Wunderwaffe. This is something I'm investigating.

I meant which account can I play to go up against Cowzow, like AI ServerBot for Wunderwaffe.

AIServerBot is the account that runs any AI that goes through the AIServer. It can run any AI -- Wunderwaffe, Cowzow, Prod, or even your own custom one if you make one.

Edited 3/7/2016 20:16:04
The Cowzow AI is now available: 2016-03-07 20:41:50


Fleecemaster 
Level 59
Report
Are we getting GreenTea too at somepoint? Or did I misread that?
The Cowzow AI is now available: 2016-03-08 17:32:18

talia_fr0st
Level 59
Report
But in your video you just invited the Serverbot to the game and it automatically ran Wunderwaffe, is that just the default though?
The Cowzow AI is now available: 2016-03-08 21:04:09


Lucarr10
Level 55
Report
on the subject of AIServerBot, could a second be added, so AI/Developer co-operative competition games could be possible?
The Cowzow AI is now available: 2016-03-08 21:25:11

Fizzer 
Level 64

Warzone Creator
Report
Are we getting GreenTea too at somepoint? Or did I misread that?

I have the source code to GreenTea, and I even started converting it at one point. But it proved to be too much work, so I abandoned it, and won't be pursuing it further. If anyone else wants to convert it, contact me, but be warned it will be a lot of work.

But in your video you just invited the Serverbot to the game and it automatically ran Wunderwaffe, is that just the default though?

It wasn't automatic -- watch again, I specifically ran WarLight.AI and pointed it at that game.

on the subject of AIServerBot, could a second be added, so AI/Developer co-operative competition games could be possible?

You can team up with AIServerBot and play against normal AIs, or against a team of humans.
The Cowzow AI is now available: 2016-03-08 23:59:13


Benjamin628 
Level 60
Report
Hey can someone help me get .net on my windows 10 computer?
The Cowzow AI is now available: 2016-03-09 00:43:50


ViralGoat 
Level 60
Report
Posts 21 - 40 of 52   <<Prev   1  2  3  Next >>