Play
Multi-Player
Coins
Community
Settings
Help
Community   Maps   Forum   Mail   Ladders   Clans   Recent Games
Sign In | Sign Up
<< Back to Programming Forum   

Posts 1 - 30 of 104   1  2  3  4  Next >>   
WarLight AI: 2/25/2016 04:28:01


NinjaNic 
Level 57
Report
Who will be the first to make one?

I watched the tutorial video and I think it's really cool that coders can create their own AI for WL. I understood most of what Fizzer said but a lot of the code that you're not supposed to edit is hard to understand.

Here is the blog:
https://www.warlight.net/blog/index.php/2016/02/the-warlight-ai-goes-open-source/

Edited 2/25/2016 23:05:43
WarLight AI: 2/25/2016 04:36:17


Python's Koala
Level 57
Report
I'm planning on trying. I already made an AI for the AI Games (PyBot) which did decently (1780 rating or so), so I'll probably try to port it over, then improve it. The debugging features seem much easier with WarLight as opposed to the AI Games, especially since I can challenge my AI directly. Looking forward to the challenge :)

Edited 2/25/2016 04:37:15
WarLight AI: 2/25/2016 05:19:08

Ryzys
Level 57
Report
Good luck Python, hope it goes well! To answer NinjaNic's question: not me, I wouldn't know how to make one, nor do I have the time to do so (I'd name mine RyzysAI if I did make one though)
WarLight AI: 2/25/2016 05:51:12

Fizzer 
Level 57

WarLight Creator
Report
I understood most of what Fizzer said but a lot of the code that you're not supposed to edit is hard to understand.

Some of it is hard to understand, indeed. But if you know C#, you should be able to debug through it and figure it out pretty easily.

I'm planning on trying. I already made an AI for the AI Games (PyBot) which did decently (1780 rating or so), so I'll probably try to port it over, then improve it. The debugging features seem much easier with WarLight as opposed to the AI Games, especially since I can challenge my AI directly. Looking forward to the challenge :)

Indeed! I forgot to point out that this the first time that someone can play against an AI they wrote, since TheAIGames never had that feature. Let me know if you have questions!
WarLight AI: 2/25/2016 05:59:28

Master of the Dead 
Level 62
Report
This is really cool!

@NinjaNic - Please link the blog post on your first comment if possible :)
WarLight AI: 2/25/2016 06:20:00


Thomas 633
Level 56
Report
As pretty much the bottom of the barrel as a WL player, but far better than an AI, I can play a few if you want.
WarLight AI: 2/25/2016 06:45:21

Hennns
Level 58
Report
Do you have a timeframe on this, when you'll decide what becomes the official wl Ai?

Will other Ais be playable for everyone on warlight, or just the official one?
WarLight AI: 2/25/2016 06:50:16

Алексей
Level 60
Report
Here is the bot's profile.
https://www.warlight.net/Profile?p=7263394758

Here is a game.
https://www.warlight.net/MultiPlayer?GameID=10606466

But playing with it is impossible because of the bug.

System.Exception: Server call to GetGameInfo failed. Response = {
"error": "Internal server error: Please report this to fizzer@warlight.net along with repro steps",
"details": "java.lang.Exception: FindCard(): Card not found: 6a322289-bd9b-443b-bdd2-b9d186cb6a03\n

update: the bug is fixed, you can actually play with this bot

Edited 2/25/2016 08:18:09
WarLight AI: 2/25/2016 06:55:04

Fizzer 
Level 57

WarLight Creator
Report
Do you have a timeframe on this, when you'll decide what becomes the official wl Ai?

It really depends how long it takes before I feel we've arrived at a good, solid bot that can replace the existing one. Ideally, I'd like to have this done within a month or two since I'm anxious to start building single-player levels using the new AI.

Will other Ais be playable for everyone on warlight, or just the official one?

The primary goal is to have one really good AI. If we wind up with multiple really good ones, we could potentially allow both to be used, but that's a stretch goal.

But playing with it is impossible because of the bug.

System.Exception: Server call to GetGameInfo failed. Response = {
"error": "Internal server error: Please report this to fizzer@warlight.net along with repro steps",
"details": "java.lang.Exception: FindCard(): Card not found: 6a322289-bd9b-443b-bdd2-b9d186cb6a03\n

Let me look into this.
EDIT: This is fixed now. There was a bug when an AI saw opponents playing a card. Sorry about that.

Edited 2/25/2016 07:25:47
WarLight AI: 2/25/2016 07:09:31

Алексей
Level 60
Report
Let me look into this

mailed bot's output to fizzer@warlight.net
WarLight AI: 2/25/2016 07:11:16


master of desaster 
Level 64
Report
Very cool!
WarLight AI: 2/25/2016 07:44:25


Fleecemaster 
Level 59
Report
Hmm, well perhaps it's worth me building some algotithms, I can certainly build a good bot for FFAs and multiplayer. Strat stuff would be kinda boring, but if we were to have more than 1 bot I think a 1v1 bot and a FFA bot would make a lot of sense, seeing as the play styles are so vastly different...
WarLight AI: 2/25/2016 07:57:37

Fizzer 
Level 57

WarLight Creator
Report
Hmm, well perhaps it's worth me building some algotithms, I can certainly build a good bot for FFAs and multiplayer. Strat stuff would be kinda boring, but if we were to have more than 1 bot I think a 1v1 bot and a FFA bot would make a lot of sense, seeing as the play styles are so vastly different...

An ideal AI would detect if it's in an FFA situation or a 1v1 situation and act accordingly.

An FFA bot is actually something we don't have right now. Since the competition was all 1v1, that's all we have.

I was thinking it might be as simple as doing something like "if we're in an FFA, lower our aggression factor and raise our expansion factor" or something like that.

If you have better ideas on how to make an FFA AI, it would be great!
WarLight AI: 2/25/2016 08:23:21


Fleecemaster 
Level 59
Report
Oh right, if we can incorperate both into one AI that would be best anyway, because once a FFA goes down to 2 players it's a 1v1 situation and the game switches anyway.

What might be best then is if I work on an FFA code, then I can work with whoever is creating 1v1 code and combine them.

I understand what you mean about "aggression" and "expansion" factors, that's probably what I'll focus it around, identifying which factors to alter as the game carries through.

A couple of things, are we allowed to have the bot "learn"? ie. Store information and/or change it's own code (I'm guessing not)

and are we allowed to have the bot make partially random decisions? (like the current AI does)
WarLight AI: 2/25/2016 08:28:51

Fizzer 
Level 57

WarLight Creator
Report
A couple of things, are we allowed to have the bot "learn"? ie. Store information and/or change it's own code (I'm guessing not)

Currently there's no place for the AI to store data in between turns. The best you can do now is to have it learn during the development process, then store that learned logic in the code.

and are we allowed to have the bot make partially random decisions? (like the current AI does)

Absolutely, and I think it's a good idea to for bots to be partially influenced by randomness. If there's no randomness, people tend to learn how the AI acts and can exploit it too easily.

Personally I like doing weighted randoms, so the AI is more likely to do the things it thinks are best, but it still has a chance of doing something less good (or even stupid) on rare occasions.
WarLight AI: 2/25/2016 08:32:21


Fleecemaster 
Level 59
Report
Swish.
WarLight AI: 2/25/2016 08:42:21

Алексей
Level 60
Report
WarLight AI: 2/25/2016 08:47:58


Fleecemaster 
Level 59
Report
What is it going to do with the human it won?
WarLight AI: 2/25/2016 08:58:43

Krzysztof 
Level 65
Report
@Fizzer:

 settings =>
                        {
                            settings["Fog"] = "NoFog"; //turn off fog so we can see what the AI is doing
                            settings["MaxCardsHold"] = 999; //so AI doesn't have to discard
                            //settings["OrderPriorityCard"] = "none";
                            //settings["OrderDelayCard"] = "none";
                            //settings["BlockadeCard"] = "none";
                            //settings["NumberOfCardsToReceiveEachTurn"] = 1;
                        });


can i set just template id?
WarLight AI: 2/25/2016 09:03:36

Fizzer 
Level 57

WarLight Creator
Report
can i set just template id?

Yes, the API takes a templateID json parameter, I just forgot to include it in the wrapper for the HumanGameAPI (the BotGameAPI already includes it.)

I just added it to the github repro.
WarLight AI: 2/25/2016 09:16:27


Holdway
Level 61
Report
Will other Ais be playable for everyone on warlight, or just the official one?

The primary goal is to have one really good AI. If we wind up with multiple really good ones, we could potentially allow both to be used, but that's a stretch goal.


One thing that I think would be enjoyable is if there were AI's of different standards playing on some of the ladders. Would be interesting to see what rating your AI could achieve.

If you changed the matching system on the ladders to prioritise matching Humans with Humans, and only match Humans with AI's when they are very closely rated, and perhaps limit it so that Humans only play against an AI at most 1 game out of every 3, then I think it would greatly improve the ladders and certainly make them more accessible for beginners.
WarLight AI: 2/25/2016 09:42:32

Krzysztof 
Level 65
Report
@Fizzer - thx :)


One thing that I think would be enjoyable is if there were AI's of different standards playing on some of the ladders


+1

With very restricted calculation time it's hard to imagine bot that can match top players(well, i'm not AI expert, but one second for so complex game as warlight sounds very small). I wonder what can creators do if their bots would be allowed to calculate moves for few hours in multiday games.
WarLight AI: 2/25/2016 10:08:18

Алексей
Level 60
Report
WarLight AI: 2/25/2016 10:58:09

Mike
Level 57
Report
I agree current AI needs a overhaul because I understand WL used to be mostly WR before, which may explain why AI always attacks neutrals of 2 with 4 in SR... Current AI also has no notion of big bonus or empire, defend it, complete it, break it or leave it free so your teammate can finish it (see ROR for best example).

AI will never be good enough to beat good humans as for example I'm not sure he see how much was deployed by each opponent. He can just not use history function which is very useful. And he can not guess where opponent incomes are.

Btw are AIs for random picks only ? It must be a nightmare to code in manual, especially in team game (but it's more for single team).

Edited 2/25/2016 10:58:36
WarLight AI: 2/25/2016 10:59:35


Latnox 
Level 60
Report
https://www.warlight.net/MultiPlayer?GameID=10607199 - in this game bot played REALLY bad. I'd like to see log with his bonus evaluation.
WarLight AI: 2/25/2016 11:32:30

Алексей
Level 60
Report
http://pastebin.com/sbYrNYhE

Sorry, first lines are missing.
WarLight AI: 2/25/2016 11:34:55


ps 
Level 59
Report
cool that it's open source, need to find some time to look at it
WarLight AI: 2/25/2016 11:52:32


Latnox 
Level 60
Report

http://pastebin.com/sbYrNYhE

Sorry, first lines are missing.

Pity, I was wondering how high he evaluated +1 bonuses, but they are in missing lines :/

EDIT: Also looking on those 2 games, I can see problem with fixed starting locations (like full distribution or non-random warlords) and no wastelands templates. AI will pick in every game the same places and if undisturbed make the same moves. Current AI although making bad pics, makes it every time different.

Edited 2/25/2016 12:07:11
WarLight AI: 2/25/2016 12:18:33

Алексей
Level 60
Report
Pity, I was wondering how high he evaluated +1 bonuses, but they are in missing lines :/


Here is the log for the second game
http://pastebin.com/7vr0GYAZ
WarLight AI: 2/25/2016 12:42:26


Latnox 
Level 60
Report

Here is the log for the second game
http://pastebin.com/7vr0GYAZ


Thanx. As both games have the same evaluation, here's how it looks:

evaluation		territory name		value
				
145		Sereth-Suczawa-Gurahumora	-373,31
				...
100		Triest				-46,28
99		Fiume				-43,52
95		Wien				-28,67
75		Budapest			27,53
				...
1		B?cs-Bodrog			256,52

So he putted them somewhere in the middle. Deffinatly something, that should be corrected. In my opinion starting point should be ["bonus value"/"no. of territories"] variable, and then modified by other factors.

Edited 2/25/2016 12:45:41
Posts 1 - 30 of 104   1  2  3  4  Next >>   

Contact | About WarLight | Play Risk Online | Multiplayer Strategy Game | Challenge Friends, Win Money | Skill Game | Terms of Service