View source for User talk:Tkiesel

From Robowiki
Jump to navigation Jump to search

Contents

Thread titleRepliesLast modified
Java 10003:51, 30 November 2018
Student Rumble414:02, 7 September 2012
BedMaker4323:26, 20 July 2012
Cause?806:56, 4 June 2012
Leibniz ... don't like me :)120:45, 8 May 2012

Welcome back with a new version of deBroglie! However current rumble settings permit only Java 8 therefore bots compiled with Java 10 won't appear. Would you like to re-compile your bot with Java 8? We are all excited to see what the newest version can do.

Xor (talk)01:55, 17 November 2018

Student Rumble

My engineering students are just now starting with Robocode, and we're running a rumble with student bots and sample bots. Round one will be basic Robots. AdvancedRobots will be later on in the semester. :)

Tkiesel20:58, 6 September 2012

Very cool! How do you address the issue of browsing other people's bots online, or do you? And what level are the students at?

Voidious00:12, 7 September 2012

All bots will be open source, and I'll be reading the code of each student's bot to check for plagiarism.

The students are at a complete ground level right now. I'm starting with the absolute basics (turnRight(90) makes your bot turn right 90 degrees.. etc) Then I'm teaching actual Java/programming fundamentals from there.

This all builds to them making their own LEGO/Tetrix robots later in the year, which will be in a C variant. I figure learning basic Java syntax as well as practical programming will serve them well for that.

I'm excited!

On a personal Robocode note, I've been thinking about maybe doing a new bot using the best parts of deBroglie's guts. A full on clean-up job sounds so tiring.. and it'd be nice to have a bot cleanly coded from the start. Maybe even with every method properly documented! Ahhh. Maybe it's a pipe-dream.

Tkiesel03:03, 7 September 2012
 

I saw a cool way of checking for plagiarism (or at least checking for possible instances before human verification): add both source files to their own individual lzma-compressed (eg using 7zip) files. Check the sizes. Then add them both to the same file to see how much mutual information they hold. Of course, this is easily beaten by adding junk to your source code, but it is useful for comparing texts etc =) It is also easily scriptable.

Skilgannon08:40, 7 September 2012

Nice idea!

The course resources and assignments are on an online learning system called Moodle, which has a source code plagiarism plugin that I'm interested to install and try out.

For the non Advanced bots, I'm just going to read their code to check it out. I have 13 students, so it won't be too time intensive.

Tkiesel14:02, 7 September 2012
 
 
 

Glad to see someone else enthusiastic about BedMaker. =) I also dropped Darkcanuck an email a few days ago. I'm not sure what's up - he's usually pretty responsive. Maybe a summer vacation?

Anyway, while it's not a good permanent solution, let me know if you want me to run some configurations for you and post the RoboRumble challenge files, to get you started. For instance, my current test bed is like: "400 bots that Diamond scores 60-92 against" (~top half of the rumble, bedmaker.pl -n 400 -r roborumble -ref voidious.Diamond -min 60 -max 92), and I think my next one is going to be "500 bots that Diamond scores 55 - 99 against" (ie, large random sampling of most of the rumble, excluding DrussGT and bots I score almost perfectly against).

Voidious20:02, 17 July 2012

Thanks!

I'm sure it's vacation and summer stuff. No biggie. I'm really looking forward to making some test beds so that I can try out some fixes and tweaks, give them an evening/night run on my computer and see how they fare without bothering the Rumble with them.

It's been confounding to me how often I'll make a change, test and see improvement against 8/10 bots, and see that alteration tank in the Rumble! Not to mention the time taken in manual testing. Much more fun to just code, and see the results in the morning locally.

I've been trying to get up near CassiusClay, YersiniaPestis et. al. in Rumble score before adding on more advanced stuff like Bullet Shadows and Gun Heat Waves (both of which I've got my code in a state to pretty easily tack on, thankfully!) It's been a heck of a struggle though, and I'm fighting for every 0.1 APS it seems. Good ol' law of diminishing returns.

If you wouldn't mind generating a challenge file for me, I'd be appreciative! How about....

"150 bots that deBroglie rev0108 scores 57-95 against"

That should get me a decent size test bed of bots that I'd like to see myself do much better against. There hasn't been too much churn version-to-version above the 95 percent line.. and there's been lots of churn below ~57, most of which will take more advanced work to really beat anyway.

Feel free to tell me if you think that's a poor choice for an 'Am I helping or hurting this bot with this change' type of test bed, or if it should be bigger or smaller.

Tkiesel00:29, 18 July 2012
 

Sure, here you go - I made a second with the same parameters in case you hit errors with any of the bots, or they're super slow, and you want to swap some out by hand: [1] [2] One nice thing bedmaker does is copy just those bots into roboresearch/robocode_bots, so I guess you'll have to just copy your whole rumble/robots dir in there unless you want to write a script or something. =)

That seems like a good cross-section to test general rumble performance. I hate wasting CPU cycles re-running battles with almost no variance, like bots I score 99+ against, but at the same time you have to be careful not to specialize too much on the bots you have lots of room for improvement against. I certainly haven't mastered the art of choosing test beds, but big test beds across a large section of the rumble seem pretty safe. They'll at least show you pretty quickly when you've really screwed up. =)

Voidious00:51, 18 July 2012

Thanks!

How many seasons do you usually run something like this for?

Tkiesel01:02, 18 July 2012
 

Lately I've been running ~2000 battles, which seems accurate to within 0.05 or 0.1. That's made easier now that I can do that in 2-2.5 hours on my new machine, though - previously it was taking me 2+ hours for one season of a 250-bot test bed!

So you'll have to feel it out for yourself as far as your bot and what changes you're making (and how patient you are =)). Like with some changes, I just want to know it's not totally screwing things up before testing it in the rumble. While tweaking parameters little by little, I have to run a lot more battles to know what's going on.

Voidious01:06, 18 July 2012

2000 seasons??? *brain explodes!!*

Tkiesel01:09, 18 July 2012
 

No no no, 2000 battles total. =) So for this test bed, like 13 seasons. My current test bed is 400 bots and I'm doing 5-6 seasons.

Voidious01:10, 18 July 2012
 

Excellent! After culling a few bots that were throwing BufferedInputStream errors (seems like it was bots that like to output to the external Robocode terminal instead of their own System.out) It's cranking away.

Is there a convenient way to view RoboResearch output for test beds this big other than copying to wiki? That results window is awfully crowded. :)

Thanks so much for the help, Voidious!

Tkiesel01:43, 18 July 2012
 

No problem! I don't know, my test beds are usually either so big that I only check the overall score, or so small (like my 5 worst matchups) that I can just remember the order. =) RoboResearch also has a GUI which probably has nicer output, but IIRC it puts all the scores on one line, which might be a few thousand pixels wide with 150 bots.

Voidious01:49, 18 July 2012
 

Oh, "results window", maybe you are using the GUI? I use the command line ("CLI"), which I like, but it seems most people do prefer the GUI.

Voidious01:52, 18 July 2012

All I've got is "gui.sh" and "run.sh" and run.sh doesn't do anything.

Tkiesel03:38, 18 July 2012
 

Okay. Hacked together a "cli.sh" using "gui.sh" as a template.

Problem I have now is how do I pass the challenger's name to the command line? That space between the bot name and the bot version number keeps getting me...

./cli.sh -S -C challenges/debroglie1.rrc -c tjk.deBroglie rev0108 -r 35 -s 10

fouls up on the bot name. Using the jar file doesn't seem to work either.

EDIT: Nevermind. Got it. ;)

Tkiesel04:19, 18 July 2012
 

You should be able to just put it in quotes. I have a di.sh with a commands like: java -cp bin:hsqldb.jar roboResearch.CLI -S -t 6 -c "voidious.Diamond 1.7.56.x1" di1.cfg

Voidious04:21, 18 July 2012

Quotes didn't work because quotes get a bit mangled when passing from one bash script to another. I just went ahead and called java directly. Now I have a terminal window running the RoboResearch server, and three windows each chugging away on bots. (rev108 and two changes to surf wave timing and MEA predict timing. Probably veeeery small changes there. Oh well.)

It's going though. Woot!

Tkiesel04:40, 18 July 2012
 

Is it bad to run two of these simultaneously out of the same directory. The CLI is needing lots of babysitting because of stuff like

Thead 1: Unrecognized output from robocode, "Got an error with alex.Diabolo5: java.lang.ClassNotFoundException: alex.Diabolo5". Killing battle.

followed with lots of java.io.IOException stuff.

Tkiesel20:57, 18 July 2012
 

I'm not sure, I always run one challenge at a time with the max threads I'm willing to use ("-t 6" for 6 threads). That error does sound like they might be stepping on each other's toes.

Voidious20:59, 18 July 2012

Oddly enough, using the -t tag for more threads causes problems for me...

(Running using server) Result for robot named "tjk.deBroglie rev0115 (2)". Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1949) at roboResearch.engine.Result.<init>(Result.java:31) at roboResearch.engine.BattleResults.load(BattleResults.java:42) at roboResearch.engine.BattleResults.load(BattleResults.java:24) at roboResearch.engine.BattleRunner.run(BattleRunner.java:107) at roboResearch.CLI.run(CLI.java:94) at roboResearch.CLI.<init>(CLI.java:69) at roboResearch.CLI.main(CLI.java:38)

Tkiesel21:28, 18 July 2012
 

Hmm, weird. Well, I don't know if this is the issue, but the instructions say when you use -t, you should also start the SQL DB separately and pass -S. The command to start the DB is:

java -Xmx1024M -cp hsqldb.jar org.hsqldb.Server -database.0 file:roboresearch -dbname.0 roboresearch

So I do that, then run with "-S -t 6" and it works. That "tjk.deBroglie rev0115 (2)" almost seems like you have two of that bot/version in a battle against itself, though - is that the case? Not sure if I've tried that or if it would cause issues.

Voidious22:39, 18 July 2012
 
 
 
 

So I decided to go ahead and grab the latest tarball from the RoboResearch SourceForge site. A little rough with the documentation.. (TUI.java doesn't exist, and it never tells you to compile Server.java)

I've got the server up and running. The client is being reluctant though.

I got this:

Thread 1: Running tjk.deBroglie rev0117 vs. EBBU.Sim2 1.02

Thead 1: Unrecognized output from robocode, "jeremyreeder.Vincent: Got an error with this class: java.lang.IllegalStateException: Can't overwrite cause". Killing battle. Thread 1: will be terminated java.io.IOException: Stream Closed at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(FileInputStream.java:236) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:282) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:324) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:176) at java.io.InputStreamReader.read(InputStreamReader.java:184) at java.io.BufferedReader.fill(BufferedReader.java:153) at java.io.BufferedReader.readLine(BufferedReader.java:316) at java.io.BufferedReader.readLine(BufferedReader.java:379) at simonton.utils.ReaderByEvents.run(ReaderByEvents.java:30) Thead 1: battle was terminated

I saw on Talk:Scarlet that maybe it's an issue of Robocode version, so I copied over all of my 1.7.3.0 libs from the RoboResearch directory I've been using. No dice there, because now the error is:

Thead 0: Unrecognized output from robocode, "Loaded net.sf.robocode.api". Killing battle. Problem running sample match, aborting

Dang. :(

Tkiesel15:19, 20 July 2012
 

That error you're getting is just because RoboResearch is really strict and dies if it sees any console output it doesn't recognize. Some newer versions of Robocode added some new output and it broke RoboResearch. The updated versions (like the zip you downloaded, from Chase-san) should have that fixed. I also posted a version of mine a while back (with hacked melee support) here if you want to give that a try.

I'd make sure you've copied the libs into roboresearch/libs and installed a new version of Robocode into roboresearch/robocode_install. I went years before realizing it was using the libs/robocode.jar to run battles, not the one in robocode_install, nullifying tons of tests I thought I'd run on bots in different Robocode versions.

I hate seeing people struggle so much getting RoboResearch setup, because it's so freaking useful once you have it going!

Voidious15:45, 20 July 2012

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

Return to Thread:User talk:Tkiesel/BedMaker/reply (29).

 

Well, the libs dir is what's actually used to run the battle. I'm not sure the version in robocode_install even matters, but I'd keep it the same for the sake of argument.

Voidious16:06, 20 July 2012
 
  • grumbles*

Unzipped archive. Installed a fresh Robocode into the robocode_install directory. Started up database_server.sh No problems.

First problem on client run:

java.io.FileNotFoundException: settings/properties (No such file or directory)

No settings directory and settings/properties file in the .zip archive. Copied that from my old RR and adjusted the paths accordingly. Could you post the contents of your settings/properties file? Some stuff in there that I'm not sure about, especially that "threads" line.


Second Problem: Bunch of sample.VelociRobot problems? Ah ha! looks like your comment at Talk:Scarlet. I deleted all the sample bots from robocode_bots.

Third problem: It's still yelling about sample.VelociRobot? Grrrrrrrr.

Tkiesel16:35, 20 July 2012
 

Deleted everything from inside roboresearch/trunk/robocode_install/robots, including non-.jar robots. This eliminated errors about sample.VelociRobot.

Now I'm back to this again....

tom@gecko ~/roboresearch/trunk $ ./cli.sh -S deB108.cfg

Challenge Specifications:

Challenge: deBroglierev108 150-57-95

Bot: tjk.deBroglie rev0108

Alias: null

Rounds: 35

Threads: 1

Type: null

Seasons: 14


(Running using server)

Thread 1: Running tjk.deBroglie rev0108 vs. EBBU.Sim2 1.02


Thead 1: Unrecognized output from robocode, "jeremyreeder.Vincent: Got an error with this class: java.lang.IllegalStateException: Can't overwrite cause". Killing battle.

Thread 1: will be terminated

java.io.IOException: Stream Closed

at java.io.FileInputStream.readBytes(Native Method)

at java.io.FileInputStream.read(FileInputStream.java:236)

at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:282)

at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:324)

at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:176)

at java.io.InputStreamReader.read(InputStreamReader.java:184)

at java.io.BufferedReader.fill(BufferedReader.java:153)

at java.io.BufferedReader.readLine(BufferedReader.java:316)

at java.io.BufferedReader.readLine(BufferedReader.java:379)

at simonton.utils.ReaderByEvents.run(ReaderByEvents.java:30)

Thead 1: battle was terminated

  • sigh*
Tkiesel16:42, 20 July 2012
 

I should note: after that line "Thread 1: Running tjk.deBroglie rev0108 vs. EBBU.Sim2 1.02" there's a LOOONG pause by RoboCode standards..


Deleted both jeremyreeder bots in the challenge file because both of them threw that same error.

Now it's

(Running using server)

Thread 1: Running tjk.deBroglie rev0108 vs. EBBU.Sim2 1.02


Thead 1: Unrecognized output from robocode, "tjk.deBroglie rev0108 stopped successfully.". Killing battle.

Thread 1: will be terminated

java.io.IOException: Stream closed

-- etc etc etc --

Thead 1: battle was terminated

Thread 1: Running tjk.deBroglie rev0108 vs. Ex.Survival 3.7


Hey Voidious, mind zipping your entire current roboresearch directory (sans only trunk/robocode_bots which I can populate from my rumble folder) so I can try a crack at it? I'll have to edit trunk/settings/properties to fit my paths, but otherwise should need to change nothing.

Tkiesel16:53, 20 July 2012
 

I was thinking of asking you the same... =)

Ok, I cleared out robocode_bots, working_dirs, robocode_install/robots, robocode_install/battles, database/roboresearch.log, and database/roboresearch.script, and here you go: [1]

Voidious17:04, 20 July 2012
 

I haven't fired this thing up yet... but it doesn't have a lib directory. Is that normal?

Tkiesel17:09, 20 July 2012
 

I'd forgotten about that, but it looks like I modified BattleRunner.java to look in robocode_install/libs instead, so there's no libs directory confusion like I fell victim to. =)

Voidious17:12, 20 July 2012
 

Ah ha!

After a permissions issue of some kind ("user not found" kind of thing) with the db, I just managed to get battle srunnign with one thread. Now trying 3+.....

Huzzah!!!!! Working!!!

Voidious, you are a king, good sir! Thank you a thousand times!

Oh, and I am about to send you an email to let you know about soemthing else that was in that file. Take it down from your hosting ASAP!

Tkiesel17:19, 20 July 2012
 

Awesome! And thanks for the lightning quick feedback on the potential security breech. =)

Voidious17:25, 20 July 2012
 

Not a problem! :) Thanks (yet) again for all of the help!

Tkiesel17:28, 20 July 2012
 

You might want to tweak the CPU constant from what I have set. You can just start Robocode from robocode_install and do Options > Recalculate CPU constant (or something like that). The number in my config/robocode.properties was calculated on my system then manually increased a bit, just to be safe with the multiple threads.

Voidious17:55, 20 July 2012
 

Thanks for the tip. I recalculated it just now, and added ~5% just for kicks.

Do you occupy every core on your machine? I've been leaving one free just because I'm paranoid about skipped turns.

Tkiesel22:40, 20 July 2012
 

Yes, and actually, on my new quad core with hyperthreading, I'm using 6 threads. The OS thinks I have 8 because of hyperthreading, and somewhat surprisingly, 6 or even 8 run measurably faster than 4. For the RoboRumble, I only run 3 because the integrity matters a lot more there. I up my CPU constant by ~25%, which is about how much slower individual battles run going from 4 to 6. There's some talk and benchmarks on User_talk:Voidious#CPU_benchmark_advice_47 if you want to have a look.

Voidious22:48, 20 July 2012
 

Cool. Well, I'm off on fixing up my hitrate normalization.. so that I can choose my firepower more intelligently.

The painful part is that this really screws with my score via mucking with my movement choices... Stat decay and flattener amount run off of the enemy's normalized hitrate already. Ahh, but I can see how my changes influence things against a big group of bots now! It's great!

Tkiesel23:26, 20 July 2012
 
 

So... is stuff like this, this, or this caused by skipping turns and dropping radar lock?

Right now this bot has no "oops, I skipped a turn and lost my radar lock" type contingency code. If I drop radar lock, deBroglie'll just sit there and die that round.

Tkiesel04:48, 4 June 2012

Hmm... I don't think so. While IMO it's important to handle "oops, I skipped a turn and lost my radar lock" gracefully, that would have a similar probability of affecting any given round out of the 35 rounds, which would likely not result in such a huge gap between battles.

Whatever the problem is likely is something that affects subsequent rounds after the problem first occurring I think... Times like this make me wish Roborumble sent slightly more information to the server (i.e. per round results, or compressed robot stdout logs for the last <insert-number-here> battles in the rumble)

Rednaxela05:37, 4 June 2012

A few little spots where NullPointerExceptions crept in. Just needed a few sanity checks here and there. Wave surfing with a kNN is very interesting in round one.. where there may be little or no data to go on yet!

Tkiesel05:47, 4 June 2012

I would argue that aspect is more of an issue for VCS, because in kNN you'll always get at least one data point after the first wave passes, whereas in VCS you could get no data even after the first wave passes. Though in both cases you need to handle the no-data case gracefully of course.

Rednaxela06:02, 4 June 2012

What bites me is that I cull points via displacement vectors (points that would lead off of the battlefield), so it's still feasible for me to end up with an empty return till about 1/2 to 3/4 of the way through round one.

I really should drop the displacement culling and see if it hurts/helps. It may be a bit of complexity I don't need.

Tkiesel06:11, 4 June 2012
 

Hmm, you're surfing displacement vectors? Or just using them for bounds checking? If it's the former, that's pretty interesting. Maybe try wall smoothing them instead?

If it's just for bounds checking, that doesn't make much sense to me in movement. In a gun, it makes sense to discard that data because it's clearly not the movement choice the enemy's going to make now. But in surfing, you're the one deciding on the exact movement that correlates to the firing angle, which the enemy had already chosen. I don't really see the correlation that says you should ignore the data you collected about that firing angle. But it's pretty late and my brain's pretty fried from refactoring... :-)

Voidious06:20, 4 June 2012

I record guess factors and displacement vectors for all waves, and come kNN time, I drop data with a (scaled to current situation) displacement vector that leads off the battlefield.

"If it's just for bounds checking, that doesn't make much sense to me in movement." Exactly. Basically, I need to add a boolean argument to that method so that my gun can drop points and my movement doesn't have to. After all, few if any enemies will be doing such culling, so not doing so with movement data will be a closer approximation to the enemy's view of the situation.

Tkiesel06:54, 4 June 2012
 
 

I just surf a Head-On Targeting curve if there's no data. Glad you figured it out. =)

Voidious06:09, 4 June 2012

Yeah, it struck me while walking the dog this afternoon that just seeding my movement kd-tree with a single hit at GF {-0.01,0.01} in the middle of my n-dimensional data-space would probably handle everything.

Tkiesel06:56, 4 June 2012
 
 
 
 

Leibniz ... don't like me :)

Hi mate. I would like to help you with contribute results for Leibniz but unfortunately is he crushing my systems (linux/mac) frequently. No offense, could you have a look at this bot? To me it looks like some thread issue but not quite sure about this.
take care

Wompi20:08, 8 May 2012

Sure thing. I'll drop him until I work it out!

Tkiesel20:45, 8 May 2012