Category Archives: Code

K-Means Clustering in J

Perception is essentially the problem of extracting high-level patterns from large amounts of raw-data (from sensors). Correctly recognizing the pattern/shape “dog” in a bitmap is one example of a tricky perceptual task. Note that the symbol “dog/not dog” is much less information than the raw image data. This compression is vital for being able to [...]

Posted in Code | Tagged , , , | 1 Comment

Nyx

I don’t usually post projects that are only mostly done, but I wanted to get this off my plate. It’s a simple cardgame built entirely in javascript called Nyx (after the Greek goddess). Each turn consists of both players secretly choosing an action. Actions consist of either drawing two cards, or playing a card. There [...]

Posted in Code | Tagged , , , | Leave a comment

Welcome to the Prisidium

Looks like you can’t see the iframe content. Perhaps you’re not on the blog? P.S. This post is so tall because the code is in an iframe. The code could easily integrate as a library, and I could then make this a normal post, but I want it to be encapsulated for now.

Posted in Code | Tagged , , , | 3 Comments

Simple Rationality

I don’t know why it’s taken me so long to post this. Several weeks ago I was playing a turn-based fighting game that I love, and I got to thinking “what would an AI that plays this game well look like?” And as I thought about it, it became clear to me that the challenge [...]

Also posted in Cognition | Tagged , , , , , | 6 Comments

Butchering Haskell

I picked up Haskell just under two weeks ago, and in my free time I’ve been implementing RCRPG in it, much like I did with Python. You can see my code at http://rosettacode.org/wiki/RCRPG/Haskell. It’s really not very pretty though. My mind is clearly still stuck on a procedural, object-oriented approach.

Posted in Code | Tagged , , , | Leave a comment