<< Back to Warzone Classic Forum   Search

Posts 121 - 140 of 565   <<Prev   1  2  3  4  ...  6  7  8  ...  18  ...  28  29  Next >>   
WarLight AI Challenge: 4/6/2014 15:41:05


125ch209 
Level 58
Report
Thanks it worked (i wasn't exporting as runnable JAR...)! but can't we see the output for each round like there is on theaigame website?
WarLight AI Challenge: 4/6/2014 15:49:18


ps 
Level 61
Report
to debug where my bot was crashing the sim i also had to get the conquest engine working (i call it the sim).

My code is online at:
https://github.com/psenough/warlight_ai_challenge

I made the /sim/main/RunGame.java saveGame() function output the error and message dump of bot1 to the command line

System.out.println("bot1 stdErr...");
System.out.println(bot1.getStderr());

System.out.println("bot1 dump...");
System.out.println(bot1.getDump());


And then when i call the sim i just pipe the result to a log file (you have to use a > on the command line), like so:

"C:\Program Files\java\jre8\bin\java.exe" main.RunGame 0 1 2 "..\..\temp\mybot.exe" "..\..\temp\mybot.exe" >"..\..\temp\log.txt"

Also made a few batch files to compile and run available on /scripts/

Don't know if it helps you or not but they're online on my repo if you want to check them.
WarLight AI Challenge: 4/6/2014 23:43:17


ps 
Level 61
Report
couple more bugs fixed, starting to climb through the ranks :) Hope to reach you guys within a couple of days. Won't have much time to implement anything new during this week though, but hopefully will have some time again during next week to debug a few more issues and implement some more advanced tactics :) Not that i ever got any mail back from dead piggy, that useless scoundrel, but i still have quite a few ideas of my own left to implement and hedja's tips to go over.
WarLight AI Challenge: 4/6/2014 23:45:24


ps 
Level 61
Report
Weird that it's mostly warlight folks on top positions, was expecting a little more from random computer science university students, but seems they all suck or didn't bother taking it seriously.
WarLight AI Challenge: 4/7/2014 00:15:29

RvW 
Level 54
Report
125ch209 wrote:
it says "exported with compile warnings"

That means "the code you wrote is technically valid, but are you sure it's correct, it looks rather suspicious". This could be if statements which are never executed ( "if 0 == 1" for instance; in a real case, it will probably not be so obvious the condition is always false (or always true!)), loops which never get executed ( "while 1 < 0" for instance; also in this case the example is intended to be obvious, in practice the concept will be the same, but the actual code more complex), functions which never get called, and a gazillion other things.

Note that not all warnings are in fact errors! Especially (utility) functions you used in a previous version, don't use in the current version, but want to keep around for future versions can trigger a warning. Likewise, some debugging techniques can lead to code which the compiler will give warnings over, but which you should not fix. However, in general it is a good idea to either fix warnings, or explain to yourself why a particular warning is okay.

(Apologies for the less-than-detailed examples; I'm not a Java programmer myself.)
WarLight AI Challenge: 4/7/2014 16:26:33

{rp} pedrito 
Level 48
Report
Just wondering...How many hours have you guys put into your bots on average?

Me probably some 50 or more, but it's my first time writing PHP so it's a bit of a learning experience. Enjoying every bit of it too.
WarLight AI Challenge: 4/7/2014 22:25:14


125ch209 
Level 58
Report
i've probably spend more than 50h too, and i spent at least 20hours reading about Java before i even started programming the bot. I found out yesterday that if i was writing my bot as a project, oracles would points out automatically my syntax errors...lol (so i found out about the compile warnings, wich were some imported packages that were never used)

I have a question for you guys, how do you print out the values of an arraylist?

for example, i have an arraylist of regions, and i want to print their id. i tried:

for (Region region : arrayListOfRegions){
System.out.println(region.getId());
}

but it doesn't work. any thought?

Edited 4/7/2014 22:28:12
WarLight AI Challenge: 4/8/2014 06:42:14


Norman 
Level 58
Report
@125ch209:
Change
System.out.println(region.getId());
to
System.err.println(region.getId());

System.out will break your code since then the result is written to the same stream to which your bot sends his moves.

@predito:
50 hours would mean about 3.5 hours per day for me. Don't think it took me that long.

During the first weak of coding I wrote some dirty code making my bot perform his moves.

Since then I didn't make my bot (visibly) act much smarter but I added quite complex functionality to make my bot understand what is going on on the board (what SuperRegions does opponent have?, is game in stalemate, won, lost, ,...?, where will opponent deploy?).

Next step is to rewrite the dirty code making my bot move so that he uses his model of what is going on on the board to perform some smart moves.
WarLight AI Challenge: 4/8/2014 11:10:58


ps 
Level 61
Report
i think i invested around 20 hours so far.
WarLight AI Challenge: 4/8/2014 16:25:20


125ch209 
Level 58
Report
Awesome, thanks Norman!
WarLight AI Challenge: 4/9/2014 04:02:17

{rp} pedrito 
Level 48
Report
To be honest, half of the time is spent watching the bot play... :)

I hope Fizzer incorporates one of these bots into Warlight at some point. I'm quite sure any of the top 10 beats the good old standard AI hands down. I would take a little rewriting to adapt it to teamgames and more varied maps, but definitely worth the trouble.
WarLight AI Challenge: 4/9/2014 20:19:18

RvW 
Level 54
Report
I'm not sure it's that easy pedrito. If you look at Norman's post (http://warlight.net/Forum/Thread?ThreadID=34646&Offset=116) it tries to work out what's going on behind the fog. That becomes much harder (and not anywhere nearly as reliable) as soon as there are more than two players. For instance, if you deduce (in the AI Challenge) that the opponent has Asia, from that point forward you know it has, and will keep, Asia..., until you break it. That logic already goes entirely out the window in a 1vs1vs1, and those aren't even the most complex games you can run on WL.

There are countless other problems: using (at least) reinforcement cards; cooperating with team mates (including sometimes using "attack team mate" to complete a bonus); dealing with wastelands (either existing from the start, created by cards or due to a booted or surrendered player turning Neutral); etc; etc; etc.

And that's only the problems I see no easy solutions for. Depending on how a bot is written (how deeply some assumptions are embedded into the core of the logic), even giving it support for something as simple as non-standard kill rates could require a serious amount of work.



I agree it would be cool if Fizzer, when he has time to work on "AI 2.0", could take a look at these bots and see if there are ideas worth using. But transplanting a bot from the AI Challenge straight into WL does not seem like a workable idea to me.

Unless an option is added to choose between different AIs. In that case it might be possible to add (some of) these AIs and only make them selectable in games with rules suitable for them (only 1vs1, for instance).
WarLight AI Challenge: 4/10/2014 00:17:39

{rp} pedrito 
Level 48
Report
Completely agree with your post RvW. Coding a bot that takes into account all of the customization options is a huge task for sure. As you said though, an option to choose a different AI whenever the custom settings allow it would solve this problem.

As for the more advanced stuff like "bonus guessing" or "deployment prediction": don't need it. I could rip all of that code out of my bot and it would not lose a great deal of positions on the leaderbord. Before my bot started guessing how many armies an enemy would deploy, he was just assuming the enemy would always deploy its maximum amount. And it worked pretty well.

The questions is:
How much coding is needed to get my current bot to perform decently in a Europe 3 vs 3, for instance?
I don't know, but probably less that what I've done so far for the challenge, and certainly less hours than many of the user created maps on WL.

I'd do it for free too.

But in the end it's up to Fizzer. I do completely understand that AI is not a great priority for WL, because playing with people is the idea. Sometimes though, when playing a teamgame and someone gets booted or loses connection just when things are heating up, it's a shame to scrap a game just because the current AI _always_ attacks neutrals before enemies, doesn't defend, makes suicide attacks, etc... All of them pretty simple issues really.
WarLight AI Challenge: 4/10/2014 20:35:23

RvW 
Level 54
Report
I think the strength of the AI might be by design. Unless somebody really doesn't get this game at all, just about any human player should still outperform the AI. In team games, that means everybody should prefer their human team members to keep playing, over booting them (and turning them into an AI). If beginning players were regularly booted so a (stronger) AI could take over... that would not be very motivating.

How about you first finish the AI Challenge and then we can brainstorm about how to make WL itself benefit from your results later? :)
WarLight AI Challenge: 4/10/2014 21:14:26


Ⓖ. Ⓐrun 
Level 57
Report
If beginning players were regularly booted so a (stronger) AI could take over... that would not be very motivating.


Very good point. The AI should (to some extent) be poor at WL because it is only generally used when players are booted (it should be a penalty to that player to have a crappy replacement). If a stronger bot was made, it should only be for Single Player IMO.
WarLight AI Challenge: 4/10/2014 22:22:48


Wenyun 
Level 60
Report
because it is only generally used when players are booted (it should be a penalty to that player to have a crappy replacement).

EDIT: Well, you don't have to make the bots perfect.

In teams; a crappy AI bot is a disadvantage to the team - in FFA's, a crappy AI bot is an advantage to those near.

It would be best for the game creator to decide what kind of AI they would want (but make it a high-level unlock). The default should be the crappy/current AI, though, so that beginners/low levels will have an easier time sliding in.

Edited 4/10/2014 22:24:08
WarLight AI Challenge: 4/10/2014 23:57:57

{rp} pedrito 
Level 48
Report
In teams; a crappy AI bot is a disadvantage to the team - in FFA's, a crappy AI bot is an advantage to those near.


Quite right. People boot their neighbours in FFA games often enough if they are a single second over the time limit. Also in team games people sometimes boot members of the opposite team a little too eagerly.

On the other hand, no matter how elaborate a bot is made, I don't think they'll never compete with humans on the level that people would boot their teammates in order to get a bot to play for them instead. If people really don't want to have novice players in their team all they have to do is join a game with filters.

How about you first finish the AI Challenge and then we can brainstorm about how to make WL itself benefit from your results later? :)


If anything WL would benefit from Norman's results, not mine :D His bot never ceases to surprise me.
WarLight AI Challenge: 4/11/2014 17:24:35


Norman 
Level 58
Report
If anything WL would benefit from Norman's results, not mine :D His bot never ceases to surprise me.

From the top tier bots my bot is the worst at fighting especially in those situations where you start right next to your opponent. Basically my fighting algorithms still work the same than two weaks ago but the other bots are smarter now. At present I'm to bored to write some clean code there since that would require a complete rewrite of my fighting code (just as I did with the expansion code).

It's a mistake of most bots that they don't priorise expansion and fighting properly. If you manage to get the income advantage on this small map then I strongly disagree with keeping your expansion going. Finishing a bonus where only a couple spots are missing is probably fine but apart from that you should use your armies to finish the opponent off. On the other hand taking your fast bonuses should have top priority.
WarLight AI Challenge: 4/13/2014 11:40:44


Trogatog
Level 52
Report
Well, I definitely think I made some progress on my bot this weekend :D
WarLight AI Challenge: 4/13/2014 23:41:24


125ch209 
Level 58
Report
I was wondering: is it possible to retrieve the source code from a JAR file? if not, i think it would be nice if we put our bot as a JAR file here, so that we could run some games against eachother bots using Norman modifed engine
Posts 121 - 140 of 565   <<Prev   1  2  3  4  ...  6  7  8  ...  18  ...  28  29  Next >>