[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
AI Challenge Forums • View topic - [New Language]Clojure Starter Package

It is currently Mon Jul 23, 2018 12:10 am Advanced search

[New Language]Clojure Starter Package

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

[New Language]Clojure Starter Package

Postby ihodes » Mon Sep 06, 2010 9:49 pm

I'd love to be able to use Clojure for this contest, and the nice thing about it is that it already compiles to Java bytecode and can use the existing .class files to power it, so the only difference would likely be the source code.

Is it too late to add this in (I'd be willing to help)? If so, that's fine–but if not, it would be fun.

Thanks for hosting this contest!
ihodes
Lieutenant
 
Posts: 14
Joined: Mon Sep 06, 2010 9:44 pm

Re: Clojure Starter Package

Postby a_babo » Mon Sep 06, 2010 10:35 pm

I prefer to use clojure as well, please consider to add it as a supported package.
a_babo
Cadet
 
Posts: 7
Joined: Mon Sep 06, 2010 10:30 pm

Re: Clojure Starter Package

Postby jeff.cameron » Tue Sep 07, 2010 1:34 am

Yes, we can support Clojure! We already have support for the language in the backend from the Tron contest a few months back. All we need is the starter package. Could you make it for us? See my post viewtopic.php?f=18&t=412 for some tips on what we need.

Basically, somebody just has to send us the source files of a simple working bot in Clojure, and then we're done!
jeff.cameron
Contest Organizer
 
Posts: 91
Joined: Sun Jan 31, 2010 4:06 am

Re: Clojure Starter Package

Postby amstan » Tue Sep 07, 2010 1:52 am

Please follow these instructions to expedite the process:


Thanks
Alexandru M. Stan
Contest Organizer
User avatar
amstan
Contest Organizer
 
Posts: 691
Joined: Sun Jan 31, 2010 4:02 am
Location: Stoney Creek, Ontario

Re: Clojure Starter Package

Postby ihodes » Tue Sep 07, 2010 5:59 am

Alright, I had some time to write the planet-wars.clj part of this: next up is a bot, but I'll sleep now, and do it tomorrow. Posting what I have so far so others done waste time! This is well-documented, so it's as long as the .rb version ;) but should make it easy to follow. I'm sure there's stuff I could do to clean it up, and I haven't tested it but it compiles and the parts work!

I'll post the rest tomorrow.

planet-wars.clj.zip
(1.44 KiB) Downloaded 88 times
ihodes
Lieutenant
 
Posts: 14
Joined: Mon Sep 06, 2010 9:44 pm

Re: Clojure Starter Package

Postby ihodes » Tue Sep 07, 2010 5:46 pm

So this seems to be working: problem is, it takes > 1 second for a Clojure instance to get all set up, so the bot times out before it can start playing.

So what can be done so the bot doesn't time out while starting up? Perhaps I need to tinker with the Clojure code, and AOT compile it etc. but that should be unnecessary, right?

Also, my bot works differently than the Python one, so I could clean that up before making this final, but everything else appears to be the same. Once this issue is worked out, I'll tidy up whatever else is needed.

Please let me know what is needed.

Instructions in README.

(stored here because with src and jars it's over the forums' 2MB limit: http://cl.ly/2IIN)
ihodes
Lieutenant
 
Posts: 14
Joined: Mon Sep 06, 2010 9:44 pm

Re: Clojure Starter Package

Postby aerique » Tue Sep 07, 2010 5:57 pm

The previous challenge had a 3 second limit for the first turn. Perhaps they could implement that this time as well.
aerique
Brigadier-General
 
Posts: 131
Joined: Fri Feb 05, 2010 3:23 pm
Location: Netherlands

Re: Clojure Starter Package

Postby ihodes » Tue Sep 07, 2010 5:58 pm

That would be excellent–I think that's enough for it all to compile and run etc. If that's implemented, then what's submitted could be a started back (though I could change a few characters in it to mirror Python's starter pack, too).
ihodes
Lieutenant
 
Posts: 14
Joined: Mon Sep 06, 2010 9:44 pm

Re: Clojure Starter Package

Postby ztellman » Tue Sep 07, 2010 6:35 pm

I'd like to quibble with the instructions given in the README. They assume that the only dependencies will be clojure and clojure-contrib, which seems unnecessarily limiting.

Instead, why not just have the command line read:

java -cp lib/*:src/ clojure.main src/pw/bot.clj
ztellman
Cadet
 
Posts: 2
Joined: Tue Sep 07, 2010 6:29 pm

Re: Clojure Starter Package

Postby ihodes » Tue Sep 07, 2010 6:40 pm

Ah yes, I'll change that. The README was just left over from my testing, and I didn't think to really change it. Sorry about that!

Nice catch!
ihodes
Lieutenant
 
Posts: 14
Joined: Mon Sep 06, 2010 9:44 pm

Next

Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron