Artificial Intellingence Programming Assignments and Cats
Artificial Intellingence Programming Assignments and Cats
21/05283
ASSIGNMENT 1
i) Atom – An atomic unit of data, as ingle value that cannot be further broken down. It can be a
number, symbol or string.
Example: 5, “Mango”, “Hillary”
ii) String – A sequence of characters treated as a single unit.
Example: “My name is Hillary”
iii) List – An ordered collection of data tems, where each item can be an atom, string or another
list.
Example: [“Hillary”, 5, “Mango]
ASSIGNMENT 2
i) States: Representations of the conditions at various stages in a planning system. These could
be initial, intermediate, or goal states.
These represent the various conditions or configurations of the environment at a given point
in time. Think of them as snapshots that define everything about the system's world at that
moment.
Example:
In a robot movement system, a state might be the robot's current position and its battery
level.
ii) Goal: The final state that the planning system is trying to
achieve. This is the desired end state that the planning system aims to achieve. It’s what the
system is working towards, defined by the conditions that need to be met.
Example:
In a block world problem, the goal might be to arrange blocks in a specific order.
iii) Precondition: Conditions that must be satisfied before an action can be taken in the system.
These are specific conditions that must be true before a particular action can be executed wi
thin the planning system. They act as prerequisites that validate whether an action can be pe
rformed given the current state.
Example:
In a warehouse robot scenario, a precondition for moving a box might be that the robot's
gripper is empty.
ASSIGNMENT 3
Lisp uses lists as its primary data structure, which can represent complex symbolic expressions naturally,
making it well-suited for representing knowledge in AI systems where data is often not purely numerical.
• Homoiconicity:
In Lisp, code and data share the same syntax (S-expressions), allowing programs to easily manipulate
their own code, enabling metaprogramming and powerful abstraction capabilities.
• Macros:
Lisp's macro system allows developers to create new language constructs on the fly, enabling highly
customized and flexible programming for specific AI problems.
Lisp's functional programming nature with features like recursion and higher-order functions provides a
powerful and clear way to express complex AI algorithms.
• Dynamic typing:
Lisp allows for flexible data types and dynamic type checking, which can be beneficial in the exploratory
nature of AI development.
• Ease of prototyping:
Lisp's interactive environment allows for rapid development and testing of AI concepts.
• Garbage Collection:
Automatic memory management allows developers to focus on algorithm development without worryin
g about manual memory allocation and deallocation, reducing the chance of errors.
CAT 1
a)
b)
i) Critic -
This component evaluates the performance of the learning agent by comparing its a
ctions and outcomes against the desired goals or rewards. It provides feedback on h
ow well the agent is doing, which is crucial for guiding its learning process.
ii) Learning Element -
This part of the agent is responsible for updating and improving the agent’s knowled
ge and strategies based on the feedback received from the critic. It essentially learns
from past experiences to enhance future performance.
iii) Performance element -
This is the component that makes decisions and takes actions based on the current k
nowledge and strategy of the agent. It interacts with the environment directly to ach
ieve the set goals.
c)
CAT 2