Frogs Flashcards

1
Q

What is the definition of AI?

A

AI is the study and creation of machines that perform tasks normally associated with intelligence.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are two ways AI is used?

A

To find out how people work through machine simulations, and to build machines which do useful things that require intelligence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an agent in AI?

A

In AI, an agent refers to a machine or entity that can perceive its environment through sensors and act upon it using actuators. Agents can range from humans, robots, and software bots (softbots) to simpler systems like thermostats.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an agent function?

A

An agent function is a mapping from the agent’s percepts (inputs from the environment) to its actions. Formally, it can be written as f : P?A, where P represents the set of percepts and A represents the set of possible actions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does an agent program differ from an agent function?

A

Agent function is a formal description mapping percepts to actions, the agent program is the actual implementation running on the agent’s physical architecture, executing this function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a performance measure, and why is it important for evaluating an agent?

A

is a function that evaluates how well an agent is performing based on its actions in the environment over time. It provides a quantitative way to judge the agent’s effectiveness. Examples include points awarded for cleaning squares or penalties for too many dirty squares.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the main components of an agent in AI?

A

Sensors: To perceive the environment (e.g., cameras, light sensors). Actuators: To interact with the environment (e.g., motors, arms). Agent function: The mapping from percepts to actions. Agent program: The actual implementation of the agent function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe the difference between fully observable and partially observable environments.

A

In a fully observable environment, the agent has access to complete information about the state of the environment at any given time through its sensors. In a partially observable environment, the agent only receives partial or incomplete information, requiring it to make decisions with some level of uncertainty.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the difference between a deterministic and a stochastic environment?

A

In a deterministic environment, the outcome of any action is predictable and certain. In contrast, a stochastic environment involves randomness or uncertainty, meaning that the outcome of an action might not always be the same even if the action is repeated in the same situation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does an episodic environment differ from a sequential environment?

A

episodic environment, the agent’s interactions are broken into seperate independent episodes with clear beginnings and ends (ie playing a game level). Each episode resets the environment, and the agents goal is to maximise rewards within that single

sequential environment, the outcome of the agent’s current action influences future decisions, rewards and states e.g automous car driving.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the difference between reflex agents and model-based agents?

A

Reflex agents make decisions solely based on current percepts, without consideration of history or internal states. Model-based agents maintain an internal model of the world that helps them keep track of past percepts and update their knowledge, allowing for more informed decision-making.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are goal-based and utility-based agents?

A

Goal-based agents act with a specific goal in mind and search for a sequence of actions that will achieve that goal. Utility-based agents not only aim for a goal but also try to maximize a utility function that quantifies the desirability of different outcomes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Is ChatGPT a model-based agent? Why or why not?

A

No, ChatGPT can be considered a model-based agent because it doesn’t maintains an internal state (the conversation history) and uses this context to generate coherent responses based on past interactions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is embodied AI, and why is it important?

A

Embodied AI emphasizes creating AI systems that physically interact with the real world, just like humans. This approach is important because simulating real-world conditions is complex, and physical interaction often presents challenges that are hard to model accurately in a simulation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is an AI agent?

A

A machine that perceives and acts in an environment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are sensors/percepts?

A

Inputs from the environment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are actuators/actions?

A

Outputs or responses to the environment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is an agent function?

A

a formal mapping from percepts to actions - f : P -> A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is an agent program

A

The software that implements the agent function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is a performance measure?

A

a metric to evaluate an agent’s success

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is an environment?

A

The world in which the agent operates, which can vary (deterministic vs stochastic, fully observable vs partially observable, etc.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is a reflex vs. a model-based agent

A

Reflex agents act on immediate inputs, while model-based agents use internal states and history.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Describe the agent type and environment of a self-driving car.

A

Environment: Partially observable, stochastic, sequential, multi-agent. Agent Type: Goal-based agent (utility-based if optimizing for efficiency).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Describe the agent type and environment of a chess playing AI.

A

Environment: Fully observable, deterministic, sequential, multi-agent. Agent Type: Goal-based agent (can also be utility-based).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Describe the agent type and environment of a weather forcasting system.

A

Environment: Partially observable, stochastic, sequential, single-agent. Agent Type: Model-based agent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is a state-search problem?

A

involves finding an unknown path from an initial state to a goal state in a defined space of possible states. Each state can transition to others through specific actions, and the goal is to identify the correct sequence of actions to reach the goal state.

27
Q

How does a look-ahead tree search work?

A

starts from the initial state, creating a root node. It systematically expands nodes by selecting valid actions, transitioning between states using a transition model. The process continues until the goal state is reached. The search traces back through the nodes to identify the action sequence leading to the goal.

28
Q

What are the key components of a look ahead state based search problem?

A

Initial state s0
Set of possible actions for that state {a1, a2, …}
Transition model that returns the state s’ from taking action a when in state s
Goal test that tells agent if the current state is the goal state

29
Q

What is the transition model in a state based searchproblem?

A

Essentially the rules of the game that define how each action changes the current state - has current state, action and resulting state after action is taken. It tells the agent about the next state, predicting where the agent would end up if it took a specific action from current state - it doesn’t actually move it.

30
Q

What are the different types of search methods?

A

Uninformed Search: No additional information beyond the problem definition is available (e.g., BFS, DFS).
Informed Search: Uses heuristics to guide the search toward the goal more efficiently (e.g., A*).
Adversarial Search: Involves competing agents with opposing goals, like in games (e.g., Minimax).
Stochastic Search: Handles uncertainty in transitions between states by considering probabilistic outcomes

31
Q

What are the two algorithms/frameworks to implement state based searches and what types of searches do they work best for?

A

Tree search and graph search
Tree - Uninformed search (some informed searches) where you don’t need to check for previously visited states.

Graph - complex informed search problems, stochastic, adversarial - problems where you can loop back to previous states - avoids repeted exploration by keeping track of explored nodes

32
Q

What is the difference between BFS and DFS in tree search algorithms?

A

Breadth-first search (BFS) explores nodes level by level, using a queue to expand the nodes in order of adding them to the fringe. It’s complete and optimal for uniform costs but can be memory-intensive.

DFS - expands the most recent node added to the fringe. Depth-first search (DFS) explores by going as deep as possible along each branch before backtracking, using a stack. It’s memory-efficient but can miss solutions in infinite or looping paths and isn’t guaranteed to be optimal.

33
Q

What are completeness and optimality?

A

Completeness - Does the search strategy always frin a solution if one exists in the search space?
Optimality - Does it always find the least cost or best solution

34
Q

Whats a good compromise between DFS and BFS and how does it work?

A

Iterative Deepening search

Combines space efficientcy of DFS and completeness of BFS by repeatedly applying depth limited search with increasing depth limits. It explores all nodes at a given depth before increasing hte limit, ensuring all solutions are found while keep memory usage low

35
Q

What does admissible and consistent describe and what do they each mean?

A

Described a heuristic for A* search.

admissible (it never overestimates the true cost to reach the goal) for tree search and consistent (the estimated cost is always less than or equal to the estimated cost from any neighboring state plus the step cost) - graog search.

36
Q

In general, does it make sense to talk about optimality in terms of the path through the state space when it comes to a genetic algorithm.

A

NO. Genetic algorithms explore multiple solutions simultaneously and improve them through selection, crossover, and mutation, rather than following a specific path like traditional search algorithms. They don’t guarantee finding the optimal solution but aim for good solutions quickly.

37
Q

For an AI game for multiple players and can play against AI player, what would be a good algorithm to implement and describe how it works?

A

Minimax algorithm with alpha-beta pruning. It evaluates possible moves to maximize the player’s chances of winning while minimizing the opponent’s chances.

38
Q

For an AI game for multiple players and can play against AI player, how would you adjust difficulty levels?

A

Difficulty can be adjusted by altering the depth of the search tree. For easier levels, the AI could evaluate fewer moves, while for harder levels, it could search deeper for optimal play. You’d need a depth parameter

39
Q

What game mechanics should an AI in a game where you’re playing against an AI agent have to ensure optimality

A

To facilitate optimal play, game mechanics should include well-defined rules, a finite state space, and clear win/loss conditions. This ensures the AI can effectively evaluate outcomes and make strategic decisions.

40
Q

A* search for solving 8-puzzle where you slide numbered squares into right order. Given both heuristics are admissible and consistent, does it matter which is used to get the most optimal and fast solution? Heuritics: misplaced tile count and total manhattan distance of each misplaced tile from its goal location.

A

Yes. Both will give optimal solutions since both are admissible.

But Manhattan is usually faster/more efficient cos it provides a more precise estimate of tile movement as it accounts for the actual distance of the tiles to their goal state, leading to fewer node expansions in the search.

41
Q

Is the minimax algorithm with alpha beta pruning a DFS or BFS?

A

depth-first search (DFS) algorithm. It explores the game tree by going deep into the branches first, making it efficient in evaluating potential moves and pruning branches that won’t affect the final decision.

42
Q

What’s the purpose of alpha-beta pruning in the minimax search, and under what conditions does it work best?

A

To reduce the number of nodes evaluated in the minimax algorithm by eliminating branches that won’t influence the final decision.

It works best when the game tree is well-ordered (ie. considers best moves first), allowing the algorithm to prune large sections of the tree early. This results in faster search times while still ensuring optimality in the chosen moves.

43
Q

How do you calculate entropy for decision tree classifiers/Bayes classifier?

A
  • a log2(a) - b log2(b)
44
Q

Why might a fully consistent tree not be the best predictor of the game result for a decision tree classifier? What
could be done to alleviate the problem?

A

Because it can overfit the training data, meaning it can’t be generalised i.e. perform poorly on new data .

Pruning: Simplifying the tree by removing less important nodes.

45
Q

What are the principles for building an optimal splits decision tree.

A

Choose attributes that provide the most information gain or reduce uncertainty about the outcome, split the data at each node accordingly, and continue this process until a stopping criterion is met. This approach helps ensure the tree generalizes well to unseen data while accurately predicting outcomes.

46
Q

What is a consistent hypothesis?

A

One that agrees with all the training examples

47
Q

If multiple hypothesis are consistent to a training set, how do you choose between them?

A

Occams Razor - prefer simplest hypothesis, they generlise better to new examples

48
Q

Is a consistent hypothesis or testing a better indicator of hypothesis performance?

A

Test date (verify performance of the model), good performane (consistentcy) on the taining data isn’t necessarily a good indicator of generalisation - your hyp could be overtrained

49
Q

What is reinforcement learning?

A

Trains agent to make decisions in an unknown environment to maximise cumulative rewards. Over time agent builds a model of environment based on interactions which helps improve decision making.

Agent takes action, gets feedback (rewards/penalties), learns by balancing exploration (new actions) and exploitation (using known rewarding actions). Throufh repeated interaction the agent refined its strategy to achieve its goals. Algorithms like Q learning help the agent estimate state action pairs while policy based methods adjust the agents strategy

50
Q

What is a squential decision problem?

A

Search and planning special case. Environment is a set of distinct cases that are non-deterministic (it’s stochastic), this means no gaurantee of the same outcome from taking the same action in the same state.

51
Q

How is a sequential decision problem components different from the base components?

A

Transition model - which returns a probability ditribution for possible states that results from taking action a when in state s.
Reward associated with each state (zero or negative)

52
Q

What is reinforment learning and how is its components different?

A

RL is a set of methods that allow agent to learn what to do in an unknown stochastic environment - iot deduces the optimal policy (ie what to do in a given state) from the rewards it receives at the send of a sequence of steps (not necessaily which states in the sequenc realte to this outcome).

No transtition model, there is a reward assocuated with each state

53
Q

Exaplin how a lookahead search works

A

Lookahead search allows an agent to evaluate future states by “looking ahead” at each possible route and calculating the cost associated with moving from one town to another. By systematically considering paths and their distances, the agent can generate a sequence of actions that leads from the starting town (e.g., Otepoti) to the destination (e.g., Areketanara) by selecting the path with the least cost (e.g., the shortest or most optimal route).

54
Q

Why does steepest gradient descent optimisation work for linear regressions, binary classifiers, perceptrons, polynomial regressions

A

Steepest gradient descent works for all the models because it optimizes the loss function by iteratively adjusting the model parameters in the direction of the steepest decrease of the loss.

55
Q

Explain steepest gradient optimisation of the parameters of a hypothesis in terms
of a state-space search.

A

State: Represents the current values of the hypothesis parameters.
Actions: Adjust the parameters in the direction of the steepest descent (the negative gradient).
Evaluation Function: Measures the loss or cost associated with the current parameters.

56
Q

What is the role of the gradient in terms of the search (sttepest gradient)?

A

To identify direction of steepest increase in the error/loss function. By taking the negative of the gradient, the algorithm determines how to adjust the model parameters to minimise the trot, guiding the search towards optimal solutions

57
Q

Assuming the goal of the
deepest gradient look ahead search is to find a minima, what can be said about the completeness and optimality
of this search?

A

The search is not guaranteed to be complete or optimal, as it may get stuck in local minima or saddle points, depending on the shape of the loss landscape.

58
Q

Reinforcement learning is just supervised learning with the additional complication
that the agent is responsible for generating its own training data. Do you agree?
Explain why or why not.

A

No. SL aims to minimise error on labeled data while RL focuses on maximising cumulative reward over time which depends on delayed rewards, exploration vs exploitation - which are not present in SL.

In RL the agent learns from consequences of its actions, receiving feedback from the environment, whereas SL relies on state labeled data without interactive feedback. There learning objectives are distinct

59
Q

What does the term epoch refer to in machine learning?

A

one complete pass through the entire training dataset during the training process.

60
Q

In a neural network (aka multi layer perceptron) what are the different activation functions

A

ReLU Or(v) = max(0, v)

Sigmoid Os(v) = 1/ 1 + e^-v

61
Q

What are the signs a neural network is not trained by a perception learning rule?

A

It’s a no if there’s non-linear activations functions (Os, or Or), if there’s multiple layers (i.e. 2 or more weights), If the output structure is a matrix - perceptron rule is designed for binary output is non-binary

62
Q

Are completeness and optimality gauranteed for A* - if so, why?

A

Yes, if.

if the heurisitic is admissible (never overestimates cost to reach the goal from any node)
and consistent

63
Q

Explain how a decision tree is built and would work?

A

Choose a splitting criterion (e.g entropy/ info gain)
recursively evaluate each feature to determine the best split that maximizes the criterion
the feature that provides the best split becomes the root node of the tree; create child nodes based on this split repeat the process for each node until stopping criteria are met;
, assign class labels to the leaf nodes based on label that appears most frequently in the node),
optionally prune the tree to enhance generalization, and
traverse the tree for new instances to predict their class.

64
Q
A