OpenCyc exercise:

 

  1. Login  to phoenix.
  2. Enter the command cyc in the terminal.
  3. Bring up a browser and go to http://phoenix.goucher.edu:3602/cgi-bin/cyccgi/cg?cb-start.  You should now be in the browser window for opencyc.
  4. Login to CycAdministrator.
  5. We are going to add a couple of constants that represent dogs.  Under Tools select Create.  Create a constant called Rover (or any dog name you want!)
  6. We have to tell cyc that Rover is a dog so select Assert under Tools.   We will assert that (#$isa #$Rover #$Dog) .
    Hint:  You can type this without the hash-dollars and then hit the Cyclify button and it will add that stuff for you. 
  7. Check that Rover is in the knowledge base and that Rover is a dog.
  8. Now that we have Rover, it is pretty easy to add another dog (Fido?).  While you are looking at Rover, click on Create Similar.  This will create another constant similar to Rover.  You can click on the assertions that we have for Rover that we want to include for Fido which will include the assertion that Fido is a dog.  Then click on the Create Similar button.
  9. Check out that Fido is correctly entered in the knowledge base.
  10. Under Tools select Query.  Using Ask the knowledge base who are dogs with the query (#$isa ?X #$Dog) .  It should show your constants as being dogs.
  11. Now we want to tell the knowledge base that Rover is the mother of Fido.  Only FemaleAnimals can be mothers so we must first assert that Rover is a FemaleAnimal.  See if you can do this.  Also assert that Fido’s mother is Rover.
    Hint:  If you look at the mother predicate you will see that the first argument is the child and the second argument is the mother.
  12. Ask the knowledge base who is the mother of whom. 
  13. Feel free to browse the KB and make other assertions and queries.
  14. You can save changes to your knowledge base if you wish with something like
    (write-image “\home\jillz\myWorldN).  Replace N with an integer.  You can then load this saved image with the command
                    cyc myWorldN
    Bad things happen when writing back to an image you just loaded.  In the interest of saving disk space (each image consumes over 130M) it is possible to ping-pong back and forth between two worlds.
  15. Exit cyc in on phoenix.