ELI5: Explain Like I'm 5

Horn clause

Okay kiddo, imagine you have a bunch of rules you need to follow when you're playing a game. These rules are like little horns that tell you what you're supposed to do. They might say things like "if you roll a six, move your game piece six spaces" or "if your game piece lands on a special square, go back to the start."

In the same way, a computer program needs rules to follow when it's trying to solve a problem. A set of these rules is called a "knowledge base." A horn clause is a type of rule that's really simple and easy for a computer to understand.

A horn clause is like a little sentence that says something like "If A is true, then B must be true too." It's called a "horn" clause because it looks like a little horn with a pointy end and a curved end.

Here's an example:

If it's raining outside, then the ground is wet.

This horn clause says that if it's raining, then the ground must be wet. If you give this rule to a computer program, it can use it to figure out new information. For example, if the program knows that it's raining, it can use the horn clause to figure out that the ground must be wet too.

So, horn clauses are a simple way to give a computer program some basic rules to follow. It helps the program make logical conclusions based on the information it has.
Related topics others have asked about: