Qux comments on Botworld: a cellular automaton for studying self-modifying agents embedded in their environment - LessWrong

50 Post author: So8res 12 April 2014 12:56AM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (54)

You are viewing a single comment's thread.

Comment author: Qux 11 April 2014 04:32:17PM *  12 points [-]

For any non-Haskell-guys wanting to compile and run this, you gotta first install the "Haskell Platform". Then copy the botworld file and game file into Botworld.hs and Rudimentary.hs respectively, in the same directory. You should be able to input Example.hs into the Haskell interpreter by clicking, and end up at a command line... here you simply enter "main" and the game displays the initial and final evolution states in an ascii-grid.

You can open up Example.hs in any editor, and take a look at main() at the bottom, and see what it does or modify it - It's the point of execution.

You can change main to print out each evolution step every half-second (as soon as you look up how to perform loops in Haskell), or figure out how the three default entities (lifter, aggressor, overwriter) work. As far as I can tell thus far, all of the actions of the three figures are hard-coded and known at compile-time; there's no reasoning being done by the entities yet.

The first change I'd attempt, other than adding the output-loop, would be deciphering constree language and trying to embed some intelligence into lifter; if it can, gauge the distance between it and aggressor, and move to the richest slot unless the distance is under, say three blocks.

Comment author: SaidAchmiz 11 April 2014 07:03:52PM *  1 point [-]

There we go! This is what I meant when I asked for instructions. :)

Going to check it out as soon as I have time away from classes/etc.

Edit: Has anyone tried installing the Haskell Platform via MacPorts? I'm going to try it, I think!

Edit2: Success! Instructions (given that you have a Mac and MacPorts):


$ sudo port install haskell-platform

If you don't have git, do this step:

$ sudo port install git

Carry on...

$ git clone <https://github.com/machine-intelligence/Botworld.git>
$ cd Botworld/examples
$ curl -O <https://gist.githubusercontent.com/Soares/10444320/raw/3f96fe8e3cfe7afce7ec80d3e8fd07f304f2e6f1/gistfile1.txt>
$ mv gistfile1.txt Botworld.hs
$ runhaskell Rudimentary.hs

Edit3: How the heck do I stop the commenting software from putting those angle brackets around my URLs inside code blocks?

Comment author: RichardKennaway 11 April 2014 07:48:48PM *  1 point [-]

How the heck do I stop the commenting software from putting those angle brackets around my URLs inside code blocks?

This is an experiment. Attempt 1:

a url: <http://example.com>

Attempt 2:

a url: http\://example.com

Attempt 3:

a url: http​://example.com

1: Just the url to replicate the original problem.

2: Backslashing the colon. That blocks the URL-recogniser, but the backslash isn't interpreted.

3: Unicode ZERO WIDTH SPACE before the colon. It works! Well, no, it doesn't. You get something that looks like a url until someone tries copying and pasting it.

Comment author: So8res 11 April 2014 05:16:52PM 1 point [-]

Thanks! I didn't realize that the Rhudimentary.hs file's module name was out of sync with the file name, sorry about that. (It's been fixed, you'll now want to put the example in Rhudimentary.hs.)

I'm working on adding similar notes to the README, but it will take a little time to make sure the Haskell setup instructions are correct.

Comment author: Error 11 April 2014 04:51:19PM 0 points [-]

Thanks. Why does the botworld file not appear to be in the repo? Or am I just blind?