Shop OBEX P1 Docs P2 Docs Learn Events
How does a computer learn? - Page 2 — Parallax Forums

How does a computer learn?

2»

Comments

  • Dave HeinDave Hein Posts: 6,347
    edited 2012-01-22 08:36
    I was interested in computer learning, so I wrote a small program called Lerner. It's a chat program that uses some basic grammar rules to build up a vocabulary. I wrote it in C, but I converted it to Spin to run on a Prop also. The program and vocab memory fits in the standard 32K EEPROM. Its grammar rules are very basic, and it only understands simple statements that contain single-word subjects, verbs and predicates. It doesn't understand prepositions or compound sentences with conjunctions. It does understand the use of the articles a, an and the.

    The attached zip file contains the latest version of the code. It contains both the C code and Spin code, and a Windows executable that can be run in a command prompt window. The Windows version is slightly more advanced than the Spin version, and it contains a bigger vocabulary. It understands adjectives in the predicate, such as "Jupiter is a big planet". The Spin version does not understand the use of "big" in this sentence, but the Windows version does.

    You can ask it simple questions that start with who, what, does, is or are. You can also ask it a question by putting a question mark at the end of a statement, such as "Jupiter is a planet?". Or you can say :What is Jupiter" or "Is Jupiter a planet".

    If you tell it something new is will add it to its vocabulary, or if it's already in its vocabulary it will tell you that it already knew it.

    You can type help to get a list of commands for Lerner.
Sign In or Register to comment.