Python for AI research, outline

Sunday I mentioned that I think Python is a good replacement for Lisp as an AI language. I’m not sure if I’ll have a chance to actually write up my thoughts on this anytime soon, but here’s a rough outline of points I’d like to cover:

  • I’m planning on moving away from Common Lisp for my own research, because no CL that I’ve encountered fully meets my needs anymore. The Lisp community is fragmented and no Lisp or Scheme implementation has the community support or available libraries that Python has.
  • AI is an empirical science, where the hypotheses to be tested are computational in nature. This requires a language that facilitates quickly and easily implementing and experimenting with computational hypotheses, i.e. rapid prototyping.
  • It also requires a language that facilitates building a well-instrumented and convenient software workbench or test-bed for experimentation on whatever class of hypotheses you’re interested in. What Ben Kuipers calls building a virtual machine and Paul Graham calls programming bottom-up.
  • Python’s agility makes it well suited for these tasks. Some basic language features that make it well suited (there may be more):
    • the interactive prompt
    • untyped variables
    • rich, powerful, built-in collection types (lists and
    • C++-like operator overloading
    • A wicked module system
    • A nice clean syntax that is easy and fast to type
  • Lisp’s primary unit of abstraction is the function, which is generally thought of as inherently stateless, while Python’s primary unit of abstraction is the inherently stateful object. This may make Python better suited for many interesting AI tasks. Robots and other agents that have to act in the world must keep internal state — the Markov assumption rarely holds in the real world.
  • We Lisp/Scheme hackers pride ourselves on the ease with which we can whip up any function to suit our needs in Lisp/Scheme. This ease is even the justification for the smallness of the scheme standard library: if you need it, just write it. But why should I? I want to spend my coding time on my research problem, not coding up support functions that are unrelated to my research. Python has a large and useful standard library and a huge set of available add-on modules

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: