It is currently Thu Jun 20, 2013 6:22 am Advanced search

JAVA UNUSABLE

Code won't compile? Found a bug? Post here!

JAVA UNUSABLE

Postby thedeadwalrus » Fri Feb 12, 2010 3:12 pm

Please fix the VM for java. As has been noted many times before, it will run fine for extended periods then timeout. My algorithm will timeout even if it is set to loop for ~50 milliseconds.

If the language is being offered, it should function properly. If I would have known it was so broken I wouldn't have wasted my time working on a bot.

Thanks
thedeadwalrus
Lieutenant
 
Posts: 11
Joined: Fri Feb 12, 2010 3:10 pm

Re: JAVA UNUSABLE

Postby kevin_flynn » Fri Feb 12, 2010 8:13 pm

thedeadwalrus wrote:If the language is being offered, it should function properly.


I agree with this sentiment; I posted a similar comment here: viewtopic.php?t=169#p747

I appreciate the work that the organizers have put into hosting this challenge (I think its a great concept), but I think they have an obligations under it too. I'd be interested in any response from any organizer to the following questions:

1) Do they acknowledge that there is a serious problem creating a Java bot that doesn't timeout?
2) What is the probability of such problems being resolved a reasonable amount of time before the deadline?

Thanks.
kevin_flynn
Lieutenant
 
Posts: 17
Joined: Sun Feb 07, 2010 8:25 pm

Re: JAVA UNUSABLE

Postby rearden » Sat Feb 13, 2010 9:26 am

+1 on timing issues for Java
rearden
Cadet
 
Posts: 2
Joined: Fri Feb 05, 2010 3:13 pm

Re: JAVA UNUSABLE

Postby sasp777 » Sat Feb 13, 2010 12:08 pm

+1

I seem to time out if I try to loop for more than 20ms (!?!?). I can play a tournament locally with a 800ms soft limit for MakeMove.
sasp777
Lieutenant
 
Posts: 16
Joined: Sat Feb 13, 2010 11:57 am

Re: JAVA UNUSABLE

Postby aramadia » Sat Feb 13, 2010 11:55 pm

I think the problem is not that Java is slow, but it is impossible to retrieve an accurate time using System.currentTimeMIlli or System.nanoTime. At least I think this is the issue.
aramadia
Lieutenant
 
Posts: 14
Joined: Fri Feb 12, 2010 1:25 pm

Re: JAVA UNUSABLE

Postby callinwire » Sun Feb 14, 2010 12:49 am

+1

It calculates moves within a second on my machine, but it's timing out when I upload it here. I'd really rather not redo the entire bot in another language.
callinwire
Lieutenant
 
Posts: 16
Joined: Thu Feb 11, 2010 8:54 pm

Re: JAVA UNUSABLE

Postby berlinbrown » Sun Feb 14, 2010 1:04 am

"Please fix the VM for java. As has been noted many times before, it will run fine for extended periods then timeout. My algorithm will timeout even if it is set to loop for ~50 milliseconds."

I haven't had any time out issues as far as I can tell. But I did notice that I outputted a stacktrace on an error and that caused me to be suspended. Also, I had some system.out.printlns that I should have gotten rid of. Also caused me to be suspended.

You might check those and make sure that extraneous data isn't being output.
berlinbrown
Cadet
 
Posts: 8
Joined: Wed Feb 10, 2010 2:22 am

Re: JAVA UNUSABLE

Postby sasp777 » Sun Feb 14, 2010 1:07 am

aramadia wrote:I think the problem is not that Java is slow, but it is impossible to retrieve an accurate time using System.currentTimeMIlli or System.nanoTime. At least I think this is the issue.


This could be the case, but it seems that I can measure time fine using my local VM. We will never get to the bottom of this unless someone posts the vm/vendor version used (ex. Sun VM, 1.6_16). It should also be easy enough to check if this is a problem with currentTimeMilis by writing a bot that does nothing more than return a random move after 800ms, time measured using System calls rather then Thread.sleep() ( which I might just do later )
sasp777
Lieutenant
 
Posts: 16
Joined: Sat Feb 13, 2010 11:57 am

Re: JAVA UNUSABLE

Postby kaos » Sun Feb 14, 2010 3:54 am

Same prob... 1 look ahead algo and it says suspended....
kaos
Cadet
 
Posts: 4
Joined: Sun Feb 14, 2010 3:46 am

Re: JAVA UNUSABLE

Postby sasp777 » Sun Feb 14, 2010 9:17 am

Through a bizzare compilation problem last night (there is an announcement about this - the organisers are working hard to improve the number of games played!), it became clear to me that the VM used is:

Java VM: OpenJDK 64-Bit Server VM (1.6.0_0-b11 mixed mode linux-amd64)/w IceTea

I think this is the main cause of most Java issues, I guess most people are testing their bots in the SUN VM.

To The Organisers: Any hope that we will see an upgrade to the SUN vm in this round of improvements(or ever) ?
sasp777
Lieutenant
 
Posts: 16
Joined: Sat Feb 13, 2010 11:57 am

Next

Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron