This section lists all blog posts, regardless of topic.
Exercise 30: Web UIOctober 18, 2008
SummaryAn in-house AI's main interface is voice communication, but it should also support remote interaction via the web.
Create a web UI to view, add to, and clear the current grocery list. Add a web service to Grace to allow the ASP.NET page to submit a textual query and get a string response back.
SolutionSince Grace is a standalone Windows application (not an ASP.NET web site), adding a web service isn't quite as straightforward. It requires the Web Service Extension 3.0 and a URI such as
soap.tcp://99.236.137.8/graceservice.
Aside from the web service quirks, implementing this functionality was actually quite straight forward!
Click hereWeb UIClick hereNOTE: This will only work if my PC is running.
Exercise 29: QueriesOctober 18, 2008
SummaryImplement the following queries:
1. | |
2. | | What is {first_name}'s phone number? |
|
|
3. | | We need more {food_item}. |
|
|
4. | | What's on the grocery list? |
|
|
5. | |
Support at least 10 phone numbers and 25 grocery items.
Implementing the "What's on the grocery list?" query will involve enhancing the query system so that it can return multiple results. Implementing the "Clear the grocery list" command will involve some new syntax to allow a relationship to be cleared.
Web UIClick hereGrace applicationClick hereNOTE: The Grace application requires that you have
Expressivo installed for text-to-speech.
Exercise 28: Integrating Plato with GraceOctober 17, 2008
SummaryThe goal of this exercise is to integrate the
Plato engine with the
Grace UI, and to demonstrate the
temperature() functionality.
  | Combine the Grace and Plato projects into a single solution. |
  | Create data files (.txt) to represent each of Plato's data structures, and have Grace load those into memory when it initializes. |
  | Every 5 seconds, have Grace examine the file sizes and reload them as needed. |
  | Create a new data structure for Grace which will represent the phrases that will be recognized. They may use entity types, such as: |
 | | what is the current temperature in {city}? |
| |
  | Optional words are denoted with round brackets, and vertical bars can be used to denote several options. For required words that have several options, use square brackets. For example: |
 | | [what is|what's] the (current) temperature in {city}? |
| |
  | Transform these specifications into an SR grammar, write it to disk, compile it, and then load it. |
  | When a statement is recognized, pass it on to Plato. |
  | If Plato can't parse the statement/question, abort all operations. Simply do nothing. |
  | If Plato's output is a value, display it and speak it. |
  | If Plato's output is an assignment or relationship, briefly display a full-screen green window. (1 second) |
  | If Plato's output is a TransOutput_Program, display a full-screen gray window while the query executes. If the query completes properly, display and speak the answer. If it fails, display a full-screen red window for 1 second. |
  | Test the setup in a kitchen with a laptop, speakers, and a Bluetooth headset. |
...
older >>