[squeak-dev] Re: Google AI competition 2011: Ants.
Michael van der Gulik
mikevdg at gmail.com
Wed Nov 23 20:29:31 UTC 2011
Thanks for your reply. I did use the All-in-one package and stuck it
The Google AI folks have made a 2MB limit on the size of an uploaded
bot, as compressed source code. They have scripts to compile and run
stuff in a bunch of languages
(http://aichallenge.org/starter_packages.php). The 2MB limit is
probably flexible. They also have security issues to deal with; I
suspect they run the bots in a jail of sorts with no write access to
files, although I'm not sure about this.
The issue I came across is that, while one can "run" a .st file from
the command line quite nicely (e.g. "squeak -headless --
file:///home/user/file.st"), squeak requires write access to the
.sources file in order to file anything in. One way of working around
this would be to modify the competition's scripts to copy the image
and sources file to a temporary location and "precompile" the .st
file, writing the generated image to a temporary location for
The other option would be to allow uploading of images, but these are
usually 6MB - 15MB, or possibly more if you are getting fancy with
Anyway, I've decided not to continue because this AI competition is
becoming a distraction from my "real" projects. The source is attached
to the GP if anybody else wants to make it happen.
On Thu, Nov 24, 2011 at 12:07 AM, Andreas Raab <andreas.raab at gmx.de> wrote:
> Hi Michael -
> Two notes on this: First, you could use an all-in-one layout (such as found
> at http://ftp.squeak.org/4.2/Squeak-4.2-All-in-One.zip) to avoid the need
> for the install in /usr/local. It's a bit more to install, but hey.
> That said, you are right that there is no easy way to install Squeak as a
> runtime environment out of the box. All the downloads and installs are
> development environments (where the warning makes sense). If you have the
> ability to prepare your own image you could simply drop the changes file and
> have Preferences disable: #warnIfNoChangesFile to avoid the problems you're
> - Andreas
> On 11/23/2011 11:34, Michael van der Gulik wrote:
>> Hi all.
>> I made a Squeak package for the 2011 Google AI challenge
>> (http://aichallenge.org), attached to this email. It works (but is
>> untested by fire) but I'm giving up work on it.
>> Basically, the AI challenge does things using shell and python
>> scripts. Bots are compiled and then interact with the AI challenge
>> through stdin and stdout. This much works for me.
>> However, I was hoping that I could get the contest organisers to
>> install Squeak in /usr/local/squeak, and then to run a user's
>> submission, the VM would fire up the image in /usr/local/...
>> somewhere, file in MyBot.st, run it and quit without saving anything
>> such that no access to the file system is necessary (which is
>> obviously a requirement for running code submitted by the general
>> public). This doesn't work; Squeak fails to file in code if it cannot
>> write to its .changes file.
>> I can't be bothered to work around this issue. If anybody wants to
>> grab my code and get the AI contest to support Smalltalk as a language
>> then be my guest.
>> --- Posted on the Google AI challenge forum in "Language support"...
>> I've written a starter package for Smalltalk, attacked to this post.
>> However, I'm giving up work on it.
>> This is based on Squeak Smalltalk 4.2 (the current version available
>> from http://www.squeak.org/). It works okay with the python tools
>> except for a trivial bug: food needs to be removed from the map. I
>> fixed this bug last night but then lost the changes somehow.
>> However, I tried setting up a "server" version of Squeak for inclusion
>> into the competition's VMs, and Squeak requires write access to a
>> "changes" file (which, for the competition, would be in
>> /usr/local/squeak/Contents/Resources/) in order to read in code,
>> compile it and run. To me, this is the last straw; I've dodged too
>> many issues trying to get this to work and I'm giving up.
>> If anybody else wants to fix it up and deploy it, be my guest.
More information about the Squeak-dev