Tag Archive for project

Week 4: A sample vocab list…

Working on the parser tonight, I quickly realize that I needed to define a relatively small subset of English to handle.  I brainstormed up the following list of Scribbler-relevant commands:

Verbs:

go move drive roll stop turn rotate accelerate decelerate “speed up” “slow down” “back up” beep sing dance wander

Nouns:

light lights forwards backwards left right middle center reverse second seconds millisecond milliseconds degrees percent obstacle object

Proper Nouns:

i me you scribbler

Numbers:

0-? zero one two …

Adjectives:

maximum minimum fast faster slow slower quickly slowly

Misc conjunctions:

then and or

Funny:

love hate don’t

Even with such a limited subset, this parser may be more work than I had imagined just due to the sheer number of combinations…

Week 4: My Scribbler 2 has arrived!

I arrived home yesterday to find, sitting on my doorstep, this bad-boy:

Scribbler 2

(He was inside a box, obviously, but it’s more fun to pretend that he just drove up to my door.)

I ran through the instruction manual and experimented using the different sensors and playing with the built-in modes, which included a cool line-following mode as well as an exploration & obstacle avoidance mode.

Unfortunately, I almost immediately realized that this puppy does not support Bluetooth connectivity out of the gate.  Having it tethered to my PC via a Cable is going to be a nuisance, so I ordered a IPRE Fluke2 board.  The Fluke2 connects to the Scribbler II via the serial port and allows Bluetooth connectivity, as well as providing a low-resolution camera that may be fun to play with.  Once he has his Fluke2 board, my Scribbler will look like this:

Scribbler with Fluke

While I wait for the Fluke2 to arrive, I have begun brainstorming about the types of tasks I want the user to be able to assign via natural language:

  • Movement — Movement control, speed controls, composite movement instructions (i.e. “move forward for 4 seconds then turn left 90 degrees”)
  • Sensor Queries — Is an object in front?  On the left or right?  Is there a detectable line beneath?
  • LED Light Control — Control which of the 3 LED lights are turned on.  Other possibilities including flashing or siren modes. Also control the Fluke2 “ultra bright” LED.
  • Sound Control — Play a basic tune, or just some beeps & boops.
  • Miscellaneous — preprogrammed “fun” routines.  A draw mode, a dance mode, etc.  Remaining battery power queries.

I’m not sure if it’s feasible, but I would also love to show the camera feed in the window next to the command input, to aid in controlling.

I also decided that I want my program to have the option to display the actual code that it is sending to the Scribbler II.  This would give the program some utility as a Python education tool.

The bulk of my work this week will be on starting the Natural Language Processing component.  Prolog, here I come…

Justin working in the ACC.

Coding away in the ACC.

To-Do:

  • Come up with a name for the program I’m writing, so I’m not just constantly saying “my program”.
  • Come up with a name for my Scribbler!

Week 3: Project Proposal – Final Draft

I did some research as well as some soul-searching this week and discovered that my previous project idea, while interesting to me, just wouldn’t show off the strengths of Prolog as much I had hoped. Also, let’s be honest– simulations are great and all, but producing code that executes on a real, tangible robot is just WAY cooler!

So I have revised my project idea to focus on using Prolog as a natural language parser to control a robot. I will be using the Scribbler II, as it has pre-existing support for controlling it wirelessly using Python code– and Python can make calls to SWiPl, the Prolog interpreter I am most familiar with.

Following is the final revised draft of my project proposal:

Project Title: Controlling Robots Using Natural Language Processing

Areas of research

Natural Language Parsing, Prolog, Python, AI, robotics, as well as cross-paradigm language interaction.

Project description

I plan to use the Prolog programming language to build a natural language parsing engine to be used as a controller for a simple robot. Why is this of any value? Because Prolog’s resolution engine offers very finely-tuned depth-first-search and backtracking systems, and Prolog itself benefits from a rich history of natural language parsing application (see IBM’s Watson).

The end goal is to produce a python console program which prompts the user for instructions. The user can give natural language commands that python parses and evaluates using Prolog, which then determines an optimal sequence of instructions that it passes back to Python for execution.

I have created a blog to track my progress located at:

I hope to come away from this project having developed my knowledge of Prolog, as well as gaining an understanding for basic natural language processing methodology.

Prior knowledge

I previously studied Prolog in the Computability program here at Evergreen. The main projects I have written so far include a lexer and parser for a subset of C, an implementation of the Bellman-Ford shortest path algorithm, and some constraint-based logic puzzle solvers.

Resources needed to accomplish the project (textbooks, manuals)

I will be primarily using the “Scribbler” hobby robot, which has existing support for control using Python.

On the Prolog end, I will be using the SwiPL implementation which offers some good built-in API functionality for calling it from outside languages.

Other students you know of (if any) interested in related topics

My affinity group consists of Victoria, Jennifer, Jesse, Brian, David, Savannah, and Jason, who are all doing robotics-related projects. Richard will be the faculty advisor to this project. I know of no one else who is interested in Prolog!

Short Bibliography

I intend to use the two following textbooks to reinforce my Prolog knowledge:

“The Art of Prolog”, Sterling and Shapiro.
“Prolog Programming for Artificial Intelligence”, Ivan Bratko.

I still need to find some more good web resources on interacting with the Scribbler using Python.

Week 2: Revised Project Proposal

I have revised my project, having honed in the scope of the project after discussing it with fellow students and faculty. I have also done some research and decided on target robotics simulation suite.

Following is the revised project proposal:

Project title: Using Prolog As A Robotics Decision-Making Tool

Area of research

AI and robotic simulation, as well as cross-paradigm language interaction.

Short project description

I hope to integrate the Prolog language with a robotics simulation suite. The end goal of this is to allow for usage of logic-based programming in simple robotic decision making.

Why is this of any value? Because Prolog’s resolution engine offers very finely-tuned depth-first-search and backtracking systems, and Prolog itself benefits from a rich history of AI application.

If it works, I should be able to create a simple robotic simulation which is using a Prolog component to perform some simple decision-making tasks. I hope to extend this to touch on “Truth Maintenance Systems”, under recommendation from Richard.

I have created a blog to track my progress located at:

http://www.musicallyinept.com/blog/category/computing/cpat-project/

Prior knowledge

I previously studied Prolog in the Computability program here at Evergreen. The main projects I have written so far include a lexer and parser for a subset of C, an implementation of the Bellman-Ford shortest path algorithm, and some constraint-based logic puzzle solvers.

Resources needed to accomplish the project (textbooks, manuals)

I have found a simulation package called Webots which has a free 30-day trial and supports C, which I am much more confident that I can successfully integrate Prolog with.

On the Prolog end, I will be using the SwiPL implementation which offers some good built-in API functionality for calling it from outside languages.

Other students you know of (if any) interested in related topics

My affinity group consists of Victoria, Jennifer, Jesse, Brian, David, and Jason, who are all doing robotics-related projects. Richard will be the faculty advisor to this project. I know of no one else who is interested in Prolog!

Short Bibliography

I intend to use the two following textbooks to reinforce my Prolog knowledge:

  • “The Art of Prolog”, Sterling and Shapiro.
  • “Prolog Programming for Artificial Intelligence”, Ivan Bratko.

    I still need to find some good sources on robotics simulation and truth maintenance systems.

  • Week 1: Project Proposal – First Draft

    Project title: Application & Integration of Prolog

    Area of research

    AI and either robotics or symbolic manipulation (see below), as well as cross-paradigm language interaction.

    Short project description

    I need to do a bit more research to figure out if this is fully feasible, but I hope to integrate the Prolog language with a robotics visualization suite. The end goal of this is to allow for usage of logic-based programming in simple robotic decision making.
    Why is all this of any value? Because Prolog’s resolution engine offers very finely-tuned depth-first-search and backtracking systems, and Prolog itself benefits from a rich history of AI application.

    If it works, I should be able to create a simple robotic simulation which is using a Prolog component to perform some simple decision-making tasks.
    There is a possibility that the above may pose technical limitations beyond the scope of this project. Should my efforts in the short term to access the Prolog interpreter from robotic control code fail, I will instead switch gears and focus on implementing an automated equation solver in Prolog– something which has actually been done before. As I am very interested in tapping into Prolog from other languages, I will write a Python wrapper to access and display the functionality of the equation solver.

    Prior knowledge

    I previously studied Prolog in the Computability program here at Evergreen. The main projects I have written so far include a lexer and parser for a subset of C, an implementation of the Bellman-Ford shortest path algorithm, and some constraint-based logic puzzle solvers.

    Resources needed to accomplish the project (textbooks, manuals)

    In order to successfully integrate Prolog with robotics simulation software, I will need the software itself. Microsoft Robotics Developer Studio is free, but API calls to the simulator seem to require C#. I have found a simulation package called Webots which has a free 30-day trial and supports C, which I am much more confident that I can interface Prolog with.

    On the Prolog end, I will be using the SwiPL implementation which offers some good built-in API functionality for calling it from outside sources.

    Other students you know of (if any) interested in related topics

    Unknown. I know that Richard has a strong interest in robotics.

    Short Bibliography

    I intend to use the two following textbooks to reinforce my Prolog knowledge:

    “The Art of Prolog”, Sterling and Shapiro.
    “Prolog Programming for Artificial Intelligence”, Ivan Bratko.

    The purpose…

    I have begun this page in an effort to track my project for the “Computing Practice and Theory” program at The Evergreen State College. Stay tuned for updates!