Download Machine Learning and Reinforcement Learning Techniques and more Study notes Computer Science in PDF only on Docsity!
Unit 1 :(marks 4)
Discuss the ill structured and well-structured problem with
neat diagram.
Ill-Structured Problem: An ill-structured problem is a complex, ambiguous, and poorly defined problem that lacks clear solution paths or problem-solving strategies. These problems typically involve subjective judgments, incomplete information, and multiple perspectives. They often have no single correct answer and require creative thinking, analysis, and interpretation. Characteristics of Ill-Structured Problems:
- Ambiguity: Ill-structured problems lack clear definitions and have multiple interpretations.
- Complexity: They involve multiple variables, interdependencies, and dynamic factors.
- Subjectivity: Different individuals may have different perspectives, values, and opinions regarding the problem.
- Uncertainty: The information available may be incomplete, inconsistent, or unreliable.
- Lack of Clear Solution Paths: There is no predefined set of steps or algorithms to solve the problem.
- Creative Thinking: Ill-structured problems often require innovative approaches and thinking outside the box.
Well-Structured Problem: In contrast, a well-structured problem is a clearly defined problem with a known set of steps and a specific solution. These problems have objective criteria, well-defined goals, and known problem-solving techniques. Well- structured problems are often encountered in technical or scientific domains where the rules and constraints are well-established. Characteristics of Well-Structured Problems:
- Clarity: Well-structured problems have well-defined goals, criteria, and constraints.
- Objective Criteria: The criteria for evaluating the solution are well-established and agreed upon.
- Known Solution Paths: There are predefined problem-solving techniques or algorithms to solve the problem.
- Limited Variables: The number of variables and their interdependencies are limited and defined.
- Unambiguous: The problem and its requirements are clear and easily understood.
- Convergent Thinking: Well-structured problems typically have a single correct solution.
Knowledge representation using rules, semantic and frames.
- Logical Representation Logical representation is a language with some concrete rules which deals with propositions and has no ambiguity in representation. Logical representation means drawing a conclusion based on various conditions. This representation lays down some important communication rules. It consists of precisely defined syntax and semantics which supports the sound inference. Each sentence can be translated into logics using syntax and semantics.
Syntax:
Statements:
a. Jerry is a cat. b. Jerry is a mammal c. Jerry is owned by Priya. d. Jerry is brown colored. e. All Mammals are animal.
Advantages of Semantic network:
- Semantic networks are a natural representation of knowledge.
- Semantic networks convey meaning in a transparent manner.
- These networks are simple and easily understandable.
- Frame Representation A frame is a record like structure which consists of a collection of attributes and its values to describe an entity in the world. Frames are the AI data structure which divides knowledge into substructures by representing stereotypes situations. It consists of a collection of slots and slot values. These slots may be of any type and sizes. Slots have names and values which are called facets. Facets: The various aspects of a slot is known as Facets.
Example: 1
Let's take an example of a frame for a book
Slots Filters
Title Artificial Intelligence Genre Computer Science Author Peter Norvig Edition Third Edition Year 1996 Page 1152
Advantages of frame representation:
- The frame knowledge representation makes the programming easier by grouping the related data.
- The frame representation is comparably flexible and used by many applications in AI.
- It is very easy to add slots for new attribute and relations.
- It is easy to include default data and to search for missing values.
- Frame representation is easy to understand and visualize.
Disadvantages of frame representation:
- In frame system inference mechanism is not be easily processed.
- Inference mechanism cannot be smoothly proceeded by frame representation.
- Frame representation has a much generalized approach.
- FUZZIFICATION: It is used to convert inputs i.e. crisp numbers into
fuzzy sets. Crisp inputs are basically the exact inputs measured by
sensors and passed into the control system for processing, such as
temperature, pressure, rpm’s, etc.
- INFERENCE ENGINE: It determines the matching degree of the
current fuzzy input with respect to each rule and decides which rules
are to be fired according to the input field. Next, the fired rules are
combined to form the control actions.
- DEFUZZIFICATION: It is used to convert the fuzzy sets obtained by
the inference engine into a crisp value. There are several
defuzzification methods available and the best-suited one is used with
a specific expert system to reduce the error.
Advantages of Fuzzy Logic System
- This system can work with any type of inputs.
- The construction of Fuzzy Logic Systems is easy and understandable.
- Fuzzy logic comes with mathematical concepts of set theory and the
reasoning of that is quite simple.
- It provides a very efficient solution to complex.
- The algorithms can be described with little data, so little memory is
required.
Disadvantages of Fuzzy Logic Systems
- There is no systematic approach to solve a given problem through
fuzzy logic.
- Proof of its characteristics is difficult or impossible in most cases
- accuracy is compromised.
Application
- It is used in the aerospace field for altitude control of spacecraft and
satellites.
- It has been used in the automotive system for speed control, traffic
control.
- It is used for decision-making support systems and personal
evaluation in the large company business.
- It has application in the chemical industry for controlling the pH,
drying, chemical distillation process.
- Fuzzy logic is used in Natural language processing and various
intensive applications in Artificial Intelligence.
Bayes' theorem in Artificial intelligence Bayes' theorem: Bayes' theorem is also known as Bayes' rule, Bayes' law , or Bayesian reasoning , which determines the probability of an event with uncertain knowledge. In probability theory, it relates the conditional probability and marginal probabilities of two random events. it is a way to calculate the value of P(B|A) with the knowledge of P(A|B). Bayes' theorem allows updating the probability prediction of an event by observing new information of the real world. Bayes' theorem can be derived using product rule and conditional probability of event A with known event B: As from product rule we can write:
- P(A ⋀ B)= P(A|B) P(B) or Similarly, the probability of event B with known event A:
- P(A ⋀ B)= P(B|A) P(A) Equating right hand side of both the equations, we will get:
Difference between Forwarding Chaining and Backward Chaining:
Forward Chaining Backward Chaining
When based on available data a decision is taken then the process is called as Forward chaining. Backward chaining starts from the goal and works backward to determine what facts must be asserted so that the goal can be achieved.
Forward chaining is known as data-driven technique because we reach to the goal using the available data. Backward chaining is known as goal- driven technique because we start from the goal and reaches the initial state to extract the facts.
- It is a bottom-up approach. It is a top-down approach.
- It applies the Breadth-First Strategy. It applies the Depth-First Strategy.
- Its goal is to get the conclusion. Its goal is to get the possible facts or the required data.
- Slow as it has to use all the rules. Fast as it has to use only a few rules.
- It operates in forward direction i.e., it works from initial state to final decision. It operates in backward direction i.e it works from goal to reach initial state.
What is planning? What is a Plan?
For any planning system, we need the domain description, action
specification , and goal description. A plan is assumed to be a sequence of
actions and each action has its own set of preconditions to be satisfied before
performing the action and also some effects which can be positive or negative.
So, we have Forward State Space Planning (FSSP) and Backward State Space
Planning (BSSP) at the basic level.
1. Forward State Space Planning (FSSP)
FSSP behaves in a similar fashion like forward state space search. It says that
given a start state S in any domain, we perform certain actions required and
acquire a new state S’ (which includes some new conditions as well) which is
called progress and this proceeds until we reach the goal state. The actions
have to be applicable in this case.
- Disadvantage: Large branching factor
- Advantage: Algorithm is Sound
2. Backward State Space Planning (BSSP)
BSSP behaves in a similar fashion like backward state space search. In this, we
move from the goal state g towards sub-goal g’ that is finding the previous
action to be done to achieve that respective goal. This process is called
regression (moving back to the previous goal or sub-goal). These sub-goals
have to be checked for consistency as well. The actions have to be relevant in
this case.
- Disadvantage: Not a sound algorithm (sometimes inconsistency can
be found)
- Advantage: Small branching factor (very small compared to FSSP)
Ct
List out the various planning techniques There are several planning techniques used in artificial intelligence and computer science. Here are some of the commonly used planning techniques:
- STRIPS (Stanford Research Institute Problem Solver): STRIPS is a popular planning technique used to solve problems in a restricted domain, using a set of logical rules and goals.
- PDDL (Planning Domain Definition Language): PDDL is a language used to define planning problems and specify the goals and constraints.
- HTN (Hierarchical Task Network): HTN is a planning technique that represents plans as a hierarchical structure of tasks, with subtasks decomposed into smaller tasks until they are executable.
- CSP (Constraint Satisfaction Problem): CSP is a planning technique that models a problem as a set of variables and constraints, with the goal of finding a solution that satisfies all constraints.
- Decision Trees: Decision trees are a planning technique used for decision-making, with the goal of identifying the best course of action based on a set of inputs or conditions.
- Monte Carlo Tree Search: Monte Carlo Tree Search is a planning technique that is particularly useful for problems with a large search space, where the goal is to find the optimal sequence of actions.
- Reinforcement Learning: Reinforcement learning is a planning technique that involves an agent learning to make decisions in an environment, based on rewards and punishments for actions taken. Explain in detail the STRIPS? The STRIPS system uses a formal language to represent the planning domain and problem. The domain language defines the possible actions that can be taken in the problem, while the problem language specifies the initial state of the problem and the desired goal. The domain and problem language use a first-order predicate calculus notation that allows for the expression of complex logical statements. The STRIPS system uses a forward-chaining search algorithm to generate a plan of action. The search algorithm works by starting with the initial state of the problem and expanding possible actions that can be taken to achieve the goal state. The system uses a heuristic function to evaluate each state and determine the best action to take next.
One of the key features of the STRIPS system is its ability to use preconditions and effects to represent the conditions under which an action can be taken and the effects of an action. Preconditions are logical statements that must be true before an action can be executed, while effects are logical statements that become true after the action has been executed. For example, let's say we have a planning problem of moving a box from one location to another location. In STRIPS, we can represent the problem using the following domain and problem languages: Domain Language:
- Action(move(box, loc1, loc2)) Preconditions: at(box, loc1) Effects: not at(box, loc1), at(box, loc2) Problem Language:
- at(box, loc1)
- at(agent, loc2) The domain language defines the action "move" that can move the box from location 1 to location 2. The preconditions state that the box must be at location 1 before the action can be executed, and the effects state that the box will no longer be at location 1 and will be at location 2 after the action is executed. The problem language specifies that the box is initially at location 1 and the agent is at location 2. The STRIPS system can then use its search algorithm to generate a plan of action to move the box to location 2. What is Reinforcement Learning? o Reinforcement Learning is a feedback-based Machine learning technique in which an agent learns to behave in an environment by performing the actions and seeing the results of actions. For each good action, the agent gets positive feedback, and for each bad action, the agent gets negative feedback or penalty. o In Reinforcement Learning, the agent learns automatically using feedbacks without any labeled data, unlike supervised learning. o Since there is no labeled data, so the agent is bound to learn by its experience only.
4. Model of the environment
Advantages and Disadvantages of Reinforcement Learning Advantages of Reinforcement learning
1. Reinforcement learning can be used to solve very complex problems that
cannot be solved by conventional techniques.
2. The model can correct the errors that occurred during the training process.
3. In RL, training data is obtained via the direct interaction of the agent with
the environment
4. This is useful in real-world applications where the environment may change
over time or is uncertain.
5. Reinforcement learning can be used to solve a wide range of problems,
including those that involve decision making, control, and optimization.
6. Reinforcement learning is a flexible approach that can be combined with
other machine learning techniques, such as deep learning, to improve
performance.
Disadvantages of Reinforcement learning
1. Reinforcement learning is not preferable to use for solving simple problems.
2. Reinforcement learning needs a lot of data and a lot of computation
3. Reinforcement learning is highly dependent on the quality of the reward
function. If the reward function is poorly designed, the agent may not learn the
desired behavior.
4. Reinforcement learning can be difficult to debug and interpret.
Bn Differentiate Search & planning in ai in table
Search Planning Goal To find a path or solution from the initial state to the goal state To generate a sequence of actions that will achieve a specific goal Input A problem space defined by an initial state, a set of possible actions, and a goal state A planning domain defined by a set of possible actions and their effects, an initial state, and a goal state Output A solution path or a sequence of actions that leads to the goal state A plan that consists of a sequence of actions that achieve the goal state Knowledge Usually domain-independent and relies on heuristic functions to guide the search process Domain-specific and includes knowledge about the structure of the problem and the effects of actions Examples Pathfinding, puzzle-solving, and game- playing algorithms Robotics, scheduling, and resource allocation systems
What is Machine Learning?
Machine learning is a subset of AI, which enables the machine to automatically learn from data, improve performance from past experiences, and make predictions. Machine learning contains a set of algorithms that work on a huge amount of data. Data
state and that will maximize the reward in the future. This is done using
reward feedback that allows the Reinforcement Algorithm to learn which are
the best behaviors that lead to maximum reward. This reward feedback is
known as a reinforcement signal.
Advantages of Machine Learning : There are several advantages of using machine learning, including:
1. Improved accuracy: Machine learning algorithms can analyze large
amounts of data and identify patterns that may not be apparent to
humans. This can lead to more accurate predictions and decisions.
2. Automation : Machine learning models can automate tasks that would
otherwise be done by humans, freeing up time and resources.
3. Real-time performance: Machine learning models can analyze data in
real time, allowing for quick decision making.
4. Scalability : Machine learning models can be easily scaled up or down
to handle changes in the amount of data.
5. Cost-effectiveness: Machine learning can reduce the need for human
labor, which can lead to cost savings over time.
6. Ability to learn from experience: Machine learning models can
improve over time as they are exposed to more data, which enables
them to learn from their mistakes and improve their performance.
7. Better predictions: Machine learning models can make predictions
with greater accuracy than traditional statistical models.
8. Predictive Maintenance: Machine learning models can help identify
patterns in sensor data that are indicative of equipment failure,
allowing for preventative maintenance to be scheduled before an
issue occurs.
Disadvantaged of Machine Learning:
While there are many advantages to using machine learning, there are also
some potential disadvantages to consider, including:
1. Complexity : Machine learning algorithms can be complex and
difficult to understand, which can make it difficult for non-experts to
use or interpret the results.
2. Data requirements: Machine learning algorithms require large
amounts of data to train and be accurate, which can be difficult to
collect and preprocess.
3. Biased data: Machine learning models are only as good as the data
they are trained on, and if the data is biased, the model will also be
biased.
4. Overfitting : Machine learning algorithms can be overfit to the training
data, which means they will not perform well on new, unseen data.
5. Lack of transparency: Some machine learning models are considered
black boxes, meaning it is difficult or impossible to understand how
they arrived at a particular decision.
6. Privacy concerns : Machine learning models can process sensitive
data that could be used to discriminate or make privacy-intrusive
decisions if not used responsibly.
What are K-Strips?
K-Strips is an extension of the STRIPS (Stanford Research Institute Problem Solver) system for automated planning. The K-Strips system is designed to handle uncertainty and incomplete information in planning problems. The "K" in K-Strips stands for knowledge, as the system is based on the use of knowledge representation and reasoning techniques. In K-Strips, the knowledge base is represented using a logic-based formalism that allows for the representation of incomplete and uncertain information. The system uses a reasoning engine to manipulate the knowledge base and generate a plan of action. The reasoning engine uses a variety of techniques, including rule-based reasoning, fuzzy logic, and probabilistic reasoning, to handle uncertainty and incomplete information. One of the key features of K-Strips is its ability to represent and reason about alternative plans. The system can generate multiple plans that achieve the same goal and evaluate them based on various criteria, such as efficiency, safety, and cost.