Programming Homework Help

Programming Homework Help. AI- Knowledge representation – [Converting sentences to Prolog and Description Language ] NO CODING

This assignment has nothing to do with coding. iit is an AI assignment under the knowledge representation part. I provided 3 examples from the lecture notes that guide us to do the assignment.

The following sentences need to be written in two formats:

  • Prolog.
  • Description language.

Examples:

The following sentences need to be written in two formats:

  • Prolog.
  • Description language.

Examples:

  • Jerome is a frog.

In Prolog: frog(Jerome)

In Description Language: Jerome-> frog

  • Frog swim.

In Prolog: Swim(x):- frog(x)

In Description Language: frog ⊆ swim

  • Big fish eat frog

In Prolog: eat(X,Y):- fish(x), frog(Y), big(X)

In Description Language: [AND food[FILLS: size big]] ⊆[FILLS: foodType frog]

Or we may say in passive voice ( fish is a food eaten by big fish)

[AND food[FILLS:EatenBy[AND fish [FILLS:size big]]]

—————————————————————————-end of the examples———————————–

Now we come to the requirements of the assignment bellow:

KNOWLEDGE BASE

For the first 17 use only the concept names** Vehicle, Boat, Motor, Car, Structure, Wheel, Engine, Hub, Rolling, Water Human, Driver, Adult, Child and predicate or role names hasPart, getPowerFrom, capableOf, movesOn, drives.

undefined

**For Prolog use lower case for these symbols and upper case for variables; for DL use upper case for Concept names (as above) and lower case for names of predicates.

————————————————————————————————————————————————

Treat the first five as definitions (ie as both necessary and sufficient conditions).

  • Cars are vehicles with wheels and get power from an engine.
  • Bicycles are vehicles with wheels and get power from a human.
  • Boats are vehicles that move on water.
  • Wheels are structures that have a hub and are capable of rolling.
  • Drivers are humans who drive a vehicle.

Treat 6 to 13 as true, but not necessarily sufficient.

  • Boats do not have any wheels.
  • Cars and bicycles do not move on water.
  • Drivers of cars are adults.
  • Humans are not vehicles.
  • Neither wheels nor engines are human.
  • Humans are either adults or children.
  • Adults are not children.
  • A sportscar is a car with a big engine.

Treat 14-17 as assertions (facts).

  • Ralph drives a sportscar.
  • Ralph is human.
  • Ralph drives Boaty_McBoatface
  • Boaty_McBoatface is a vehicle that moves on water.

For 18 to 24, express these more complex statements using possibly multiple expressions. You should try to use the concepts and roles from Part 1 if you can, otherwise add new ones as needed (e.g., for “broken”).

18. Cars can have between three and four wheels.

19. Bicycles always have just two wheels.

20. A human who legally drives a car has a license and is an adult.

21. A vehicle is driven by exactly one human.

22. A car with a broken part is broken.

23. Ralph drives a sportscar with a wheel that has a broken hub.

24. Boaty_McBoatface is not broken.

Programming Homework Help

 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"