Is there anyone still trying to implement a Bot for weewar?
'
My old code is still in place, though I don't know if it's still functional. If you're asking whether anyone is hammering your servers with AI stuff, it wouldn't be from me. :)
I would be interested in helping with this, if anyone was doing such a thing!
Me too! =)
I'm halfway willing to open source some or all of my Weewar Ruby libraries. But bert, can you first tell us what you had in mind, or why you're asking? :)
I would sooo much like to work on this, but dont have the time![]()
I was playing with the thought of using machine learning algorithms to come up with the perfect weewar move each turn. But unfortunately, thats not what I am paid for![]()
Hey Pistos, is your API and script runner thing still up and running? The one mentioned here http://www.tangler.com/forum/viewTopic.action?gId=id-7466&tId=27656
I dunno, let's go see. :) /me looks...
I have been playing with the api for the last few days and added some functions to move/build/repair/etc units. I have written a Bot that accepts invitations and does its turns. The new API will be available on the testserver in the next days for you to play arround with. The interface is still very Beta but most of it is pretty usable already. I'll also share the code of the Bot so you have a reference implementation to play arround with. I am curious to see the first Bot-Duels and stuff like that. This is definitely a lot of geeky fun and I am very curious to see what strategies you are coming up with.
Awesome. For the record, my own AI thingie was not functional when I went to test it, but this looks much more promising. Thanks, bert. I look forward to playing with the new API functions.
cool!
I can't wait!![]()
What language will it be in? Is it just Pistos' API with added functions?
No, I suspect he means additions to the XML/POST API.
That would make it language agnostic.
But I will develop a Ruby library ASAP, and open source it.
Wow! This is almost as exciting as the map editor!!!
More information is available under http://weewarwiki.com/tiki-index.php?page=Eliza+API. The testserver will be back soon.
looks great too, can't wait to try it out
*drool* Can't wait.
" <weewar game='7'><sendReminder/></weewar> " We can send reminders?! ![]()
Oh, and hooray! ![]()
Yeah, you can do that as a human in the game screen.
Well, yeah, but I was hoping they had implemented email reminders we can send to players.
I remember that idea had been brought up before
the send reminder function that becomes available when a player goes over the time limit does exactly that. It sends an email reminder.
Man, this looks great!
The testserver is back. Ai is running the account "aiZappBrannigan" it'll accept all invites and plays quickly.
You should program in some tactical delays ![]()
so does it have more than 10 slots? ![]()
as long as it gets invited there should be no problem
At quick glance, he seems to take no damage from offensive attacks - only on defense.
It does make for a formidable opponent that way though! Really makes you take the battle to him.
Its playing by same rules as everyone else.
Not on this game: http://test.weewar.com/game/8
It has not taken any damage on any attacks to me, only when I have attacked it.
bert, it really doesn't seem right though... so please, just look into it
another thing, pistos, if you see this, then please let me know what you think about uploading maps to the test server, via wwpa. tx!
Is light artillery supposed to be able to move and shoot?
I just started another game: http://test.weewar.com/game/11
Just to make sure I wasn't seeing things - this time I never took a shot so I couldn't miss any damage and the AI hasn't taken a hit and it's gone after heavy infantry and tanks with infantry.
Heavy artillery can move and shoot as well...
unintentional ... I'll remove this soon.
I tried a different map just to be sure - same thing. Am I really the only one seeing the AI take no damage from offensive attacks?
sq - i too noticed zapp's artillery moving and shooting![]()
bert/zapp replied in my game
I am SO looking forward to have Zapp play one of your bots.
I'll update the testserver tomorrow. The artilleries will refrain from moving and shooting then. For the time beeing feel free to play Zapp as much as you like. He'll accept all games.
I'll probably have a semi-decent bot based on the code from your Zapp bot sometime tonight. I got your Zapp bot to run fine on my end, although it tries to build units that it doesn't have the credits for.
Are these names the standard names we have to use for eliza? "lightInfantry", 'heavyInfantry", "lighttank", "tank", "heavytank", "lightartillery", "heavyartillery"? i.e. We can't call build(int id, Coordinate c, String type ) where type is something other than the seven strings above, right? "lighttank" for raider is just odd for me.
do you want test server bugs here? especially ones that aren't related to the ai?
Okay, as I'm seeing Zapp's rating drop I'm guessing it's just happening to me, but I've tried in on a plethora of maps, logging out and then back in again, and the AI just will not take any damage when attacking me. Odd, but I guess an isolated case.
I haven't watched it carefully yet, but I can do that now
Yeah, Zapp does not take damage from its attacks...
how do aiPluto and aiQuacker work?
weird zoc bug in this game - my blue 7 raider on hex 14,10 can move to hex 15,7
heavy artillery doesn't have any zoc, same with light artillery
so 14,10 => 15,7 is legal
when aiQuacker was running, it was just a clone of Zapp. it's being tinkered with
k, tx... was the artillery zoc a recent balance change... or did i never notice or care before, or have the opportunity?
jk
i think it's been around for a while
it would be nice if there was an API thing that lets the AI accept draws if the opponent offers it.
mwahahaha i bet you can guess aiQuacker's strategy. http://test.weewar.com/game/26
ha. I am loving that. I would guess those 60 rounds took a mere minutes. this is soooooo exciting!
can the java gurus out there help me out with getting this started? i've never worked with java, so i don't really know what i'm doing. I downloaded the JDK with NetBeans (for Windows) and tried to build and run and all i get is a bunch of errors.
HELP!
ok i just figured it out... so i will write a "quick start" guide for java noobs like me![]()
first, go download and install the Java JDK and the Netbeans IDE here: http://java.sun.com/javase/downloads/netbeans.html
you are also going to need bert's ZappBrannigan implementation from the wiki: http://75.101.220.219/ZappBrannigan.zip
you are also going to need this other library called JDOM which you can get here: http://www.jdom.org/dist/binary/jdom-1.1.zip
so, first, get the java jdk/netbeans installed and open it up. Start a new project. Choose "Java Application" and make sure "Create Main Class" is unchecked
then unzip the ZappBrannigan file and go into the "src" directory. Highlight all of the .java files and drag them into the "Source Packages" folder in your Project in the left pannel in Netbeans
next up, in your Netbeans project, right click on the "Libraries" folder and choose "Add JAR/Folder..." Now go where you unzipped the jdom.zip file and then go into the "build" folder and choose "jdom.jar"
next, double click to open up WeirdoBot.java and change the elizaUrl to equal "http://test.weewar.com/api1/"
then hit F11 to compile and build and it should work
luckymustard: I'll get to it. If you don't see the option within the next few days, remind me again via the map export thread.
there should be no errors in the output window in the bottom and it should tell you what command to use at the command line to run it, like "java -jar "C:\users... etc\yourbot.jar"
then you can open up a command line and paste that stuff in and add the two arguments which are 1) your bot's username, and 2) your bot's API token
(sorry to interrupt your tutorial, Pluto, it was unintentional)
then the bot is going and will answer invites and automatically make moves and stuff. As for building on bert's bot, all the AI logic and stuff is in the WeirdoBot.java file and you only need some basic programming skills to make changes
that's all that worked for me on my Windows Vista system. If someone knows of a better way to do all of this I'd be happy to hear about it!
no problem Pistos... I hope it will help get more bots out there for the botwars!
Nice tutorial, Pluto. I've used netbeans in the past but have since moved to eclipse http://www.eclipse.org/ . Everything was pretty much the same, except maybe a little simpler. I don't think you need to download JDOM unless you want the source code and documentation. bert's zip file came with a .jar for it. Anyone who wants an eclipse run-through, I can write it out.
I also wrote out more detailed documentation and comments for bert's bot and can post it somewhere too.
oh, duh, I did not see the jdom package in bert's file.
and your documentation and comments would definitely be appreciated!![]()
Pistos, does your import/export feature work when there are no pro players? We can't upgrade. Perhaps they are still tweaking the API for pro units.
I might check out eclipse too if it's easier. thanks
Hm... I'll just post my code, which is just a slight variation of bert's bot.
Hi guys - this is great. May I suggest to add your findings / suggestions to the wiki? I am sure they will help others a great deal. Same is probably true for your bot implementations. It should be fairly easy to write a bot in a different language, too.
Here's what runs aiQuacker: DuckBot.java . I added comments here and there as I was reading through the code and then I split bert's really big run() method into smaller methods which are more manageable for me. Changes from bert's bot that I remember are:
- it builds only light infantry and heavy artillery, each with 50% chance of being picked if there are enough credits
- if it can't build what it picked on a base because it doesn't have enough credits, it will repick until there are no other units it can build there
- it will always try to build something on every base, no matter how many units it has on the board
- i renamed a couple variables (e.g. detailed -> origGameState), split up run() to smaller methods, added comments and some documentation
- i fixed a bug that made it try to build on an occupied base (i changed game.getUnit(terrain.getCoordinate()) which always returns null to origGameState.getUnit(terrain.getCoordinate()) )
spadequack: The map export relies on the ability to edit maps, so if that is a pro-only feature, then the export won't work.
Exciting!
I have thought it would take you longer than ONE DAY to defeat Zapp.
Please take a look at the XML and the general interfacing so we can make changes early.
It is of course possible to interface with Weewar over Eliza using other languages then java. My reference Implementation just gives you a good start.
@Spadequack : We should use a shared source repository to have your improvements available for everybody. Anyone ever used git? (http://github.com)
bert said: "Please take a look at the XML and the general interfacing so we can make changes early."
Huh? Do you mean look for bugs? Ask for certain features / additions?
I've never used git but it looks pretty straightforward. Sure, open up a repository and we can stick all the bots there.
I use git [nowadays]. I'm on github. (Three guesses at my username there.) I was going to release my Weewar Ruby stuff on github. I'm temporarily undecided about whether we should have one massive repo for all AI contributions, or separate ones, but I am for the moment leaning towards an individual repo (or multiple repos) for my own stuff.
test?
tangler is getting a little buggy on me... anyone else too?
let's move this to the weewar forums eh?
It was _really_ buggy yesterday. I basically couldn't read or post anything. Lots of funky stack traces and stuff.
Sending ...