OpenCyc exercise:
- Login to phoenix.
- Enter
the command cyc in the
terminal.
- 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.
- Login
to CycAdministrator.
- 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!)
- 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.
- Check
that Rover is in the knowledge base and that Rover is a dog.
- 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.
- Check
out that Fido is correctly entered in the knowledge base.
- 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.
- 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.
- Ask
the knowledge base who is the mother of whom.
- Feel
free to browse the KB and make other assertions and queries.
- 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.
- Exit cyc
in on phoenix.