First Order Logic, Logical Agents & Prepositional Logic

#DIgitalGarden

Logical Agents

Important

A logical agent is an artificial intelligence system that makes decisions based on formal logic, they rely on knowledge representations and inference to make rational and logical decisions

A logical agent relies of the use of formal logic in order to make rational decision, formal logic being a type of structured language which utilizes a systematic way of reasoning to achieve a goal or follow rules through a structured set of symbols, etc. There are two main types of formal logic:

1. Propositional logic

2. First-Order Logic

In terms of what knowledge representation means to a logical agent, it refers to the process of structuring information so that a computer can process it logically and make decisions.

Inference on the other hand refers to the process of deriving new facts from existing knowledge using logical reasoning. This is what enables an AI system to derive and make new facts from existing knowledge bases.

A knowledge base is a store of facts and rules about the world using formal representation through the use of propositional or first order logic. It is used by agents to infer new facts by simply regarding the logics in its knowledge base.

What is a knowledge based agent?

Important

It is a type of agent that is based on a set of sentences in formal language defining the rules and components of a this agent. It regards the use of these rules in order to make decisions

The sentences stored in a knowledge based agent are expressed using a knowledge based language. To define a knowledge based agent, you would need to define the components it requires to derive new facts from existing ones in its knowledge base (achieved through inference).

A declarative approach may be taken to achieve this, this approach simply means that the knowledge base is initialized without any knowledge at first, it is up to us to define its core components and properties. There are two functions to this approach:

The main components of a knowledge based agent are the following:

In terms of the main features and structure of a knowledge based agent, regard the following image:

Pasted image 20250320172351.png

To conclude what a knowledge based agent (KBA) is, its simply an agent that perceives the world around it based on its knowledge base. Any percept it receives will be used in an inference engine to generate logic based decisions that are treated as new facts. You can say that a KBA infers hidden characters in its current state through the process of logically mapping its decisions through its knowledge base.

What is Wumpus World?

Important

Wumpus world is an example/implementation of a knowledge based agent which could demonstrate how an agent as such perceives the world around it. It represents the actions, percept's, etc that the agent is capable of utilizing

In other words, Wumpus world is a game set in a task environment with 16 grids (4x4) where each grid is connected to each other horizontally or vertically. Here are the main takeaway points:

The layout of the grid with all the mentioned features may be laid out like so:

Pasted image 20250321203200.png

Regarding a peas based approach, these are the components to Wumpus world:

Propositional Logic

Important

Propositional logic is the most fundamental form of logic that could represent an algorithm. A proposition is basically a declarative statement that could either be true or false

There are two types of propositions you should know about:

Compound propositions are quite similar to basic Boolean logic as to where there are truth tables and simple connectives, however it is only limited to basic conjunctions hence making it an oversimplified manner of approaching an issue.

First Order Logic (predicate logic)

Important

FOL is an extension to propositional logic as to where it is capable of representing more propositions through the use of an extended list of statements, It in other words, is another simplified way of representing knowledge bases

Propositional logic assumes that the world contains facts (e.g. The sky is blue, a fact that already pre-exists) whereas first order logic assumes that the world contains:

Unlike basic propositional logic, FOL has multiple components to it that regard the following attributes:

The structure of an atomic sentence (sentence that cannot be simplified any further) can be broken down like so:

Pasted image 20250328173121.png

What are the properties of FOL?