AI Final-Revised
AI Final-Revised
Hill-Climbing
Keeps track of one current state (no backtracking)
Does not look ahead beyond the immediate neighbors of the current state(greedy)
On each iteration moves to the neighboring state with highest value (steepest ascent)
Terminates when a peak is reached (no neighbor has a higher value)
o Plateau is a flat area of the state-space landscape (flat local maximum and shoulder)
Improvements
Allow for a limited number of sideways moves (if on plateau that is really a shoulder)
‣ Higher success rate + Higher number of moves
Stochastic hill climbing random selection between the uphill moves, with probability related to
steepness.
‣First-choice hill climbing random testing of successors until one is found that is better than the
current state.
Random-restart hill climbing do several hill-climbing searches from randomly selected states.
‣If each hill-climbing search has probability of success p then solution will be found on average
after 1/p restarts.
‣Will eventually find the correct solution because goal state will be initial state
-------------------------
If elevation = objective function -> find the global maximum or highest peak -> hill climbing
If elevation = cost -> find the global minimum or lowest valley -> gradient descent
Stimulated Annealing
o Problem with hill climbing: efficient but will get stuck in a local maximum.
o Problem with random walk: most inefficient but will eventually find the local maximum.
o Combination of both -> simulated annealing (completer and more efficient)
Genetic Algorithms
Starts with k randomly selected states(population)
Each state (or individual) is encoded as a string
Each state is rated by objective function (aka fitness function)
Two pairs are selected at random with probability of selection increasing with fitness
Crossover point for pair is chosen at random
Offspring are created by combining string at crossover point
Small probability of random mutation
Combine
Uphill tendency and Random exploration
Exchange of information between search threads
Biggest advantage comes from crossover operation (no advantage if code is initially perfumed)
Good application requires careful engineering of code
Summary for Local Search
For many search problems we do not need the best possible solution, or the best solution is not
achievable at all.
Local search methods are a useful tool because they operate on complete search problems without
keeping track of all the states.
Simulated annealing adds a stochastic element to hill climbing and give optimal solutions in some
circumstances.
Stochastic local beam search provides a first approach to the generation and selection of states.
The uninformed (BFS&DFS)and informed(A* or best-first search )search algorithms that we have seen are
designed to explore search spaces systematically.
- They keep one or more paths in memory and by record which alternatives have been
explored at each point along the path.
- When a goal is found, the path to that goal also constitutes a solution to the problem.
- In many problems, however, the path to the goal is irrelevant.
Adversarial Search
Games most commonly studied in AI are:
Deterministic (chess (lack of randomness in the game ) )
Two-player (card and board games)
Turn-taking (ball catching or kicking games)
Perfect information (chess, tic-tac-toe)
Zero-sum(poker)
4. Result(s, a): Transition model, defining the state resulting from taking action a in state s
6. Utility(s, p): numeric value to player p when the game ends in state s
- This assigns a numerical value to the outcome of the game for a player `p` when the game ends in state `s`.
Tic-Tac-Toe
Complexity of MINIMAX
Alpha-Beta pruning
α = the value of the best (i.e., highest value) choice we have found so
far at any choice point along the path for MAX. Think: α = “at least.”
β = the value of the best (i.e., lowest value) choice we have found so
far at any choice point along the path for MIN. Think: β = “at most.”
Move ordering:
• If we have information on which moves are generally better than
others, we can improve alpha-beta pruning by first evaluating the
utility of nodes which are considered good moves.
• For instance, in chess: capture > threat > forward move > backward
move
Transposition tables
In games like chess, the same positions can occur as a result of different moves -> this is called a transposition
Exploring the search-tree from that point again would be at least double work
Results of search for positions can be stored in a transposition table
Lookup from transposition table instead of search
Chess positions can be converted into unique indexes using special hashing techniques so that lookup
has O(1) time complexity
Heuristic strategies
Shannon (1950)
Type A strategy (historically used for chess)
Consider wide but shallow part of tree and estimate the utility at that point
Type B strategy (historically used for Go)
Consider promising parts of the tree deeply and ignore unpromising paths
The MINIMAX algorithm can be determining the optimal-moves for two-player, discrete,
deterministic, turn-taking, zero-sum games, with perfect information
Heuristic evaluation functions must be used when the entire game-tree cannot be explored (i.e., when
the utility of the terminal nodes can’t be computed)
Monte-Carlo tree search is an alternative which plays-out entire games repeatedly and chooses the next
move based on the proportion of winning playouts
How can we build machines that can handle the uncertainty of the natural world?
(“in this world noting can be said to be certain, except death and taxes”- Benjamin Franklin 1789)
Dead-reckoning is the process of using information about direction, speed, and elapsed
time to calculate new location.
Odometry refers to the use of motion sensors, such as measuring wheel rotation.
Summary
Key point: Reasoning about an uncertain world is difficult!
Four examples:
• Example 1: How many boxes were behind the tree?
• Example 2: Where am I?
• Example 3: How can we predict London's temperature?
• Example 4: Can we predict the USD/Euro exchange ra
Quantifying Uncertainty
Acting under Uncertainty
Probability Theory
Probability statements are usually made with regard to a knowledge state.
Actual state: patient has a cavity or patient does not have a cavity
Knowledge state: probability that the patient has a cavity if we haven’t observed her yet.
Example: Choose between an 80% chance of getting 4000$ and a 100% chance of getting 3000$
Probability Terminological Map
Conditional Independence
P (X, Y | Z) = P (X | Z) * P (Y | Z)
Scaling up inference?
Summary
• Logic is insufficient to act rationally under uncertainty.
• Decision theory states that under uncertainty, the best action is the one that maximizes
the expected utility of the outcomes.
• Probability theory formalizes the notions we require to infer the expected utility of
actions under uncertainty.
• Given a full joint probability distribution, we can formalize a general inference procedure.
• Bayes' rule allows for inferences about unknown probabilities from conditional
probabilities.
• Neither the general inference procedure, nor Bayes' rule scale up well.
• Assuming conditional independence allows for the full joint probability distribution to be
factored into smaller conditional distributions → Naive Bayes.
Genetic Algorithm:
Graphs/Networks
Mathematical structures used to model pairwise (because any edge in the graph tells us something about how
the nodes are connected) relations between objects
Types
Directed connected graph without directed cycles is a tree. It does not need to look like a tree.
Bayesian Network
Example:
We want to know the probability that the alarm has
sounded, but neither a burglary nor an earthquake has
occurred, and both John and Mary call.
P(a, -b, -e, j, m)
Constructing Bayesian Network
Two ways to understand the semantics of a Bayesian
Network
Chain Rule
Deterministic nodes
Value of the nodes is specified exactly by the
value of is parents, with no uncertainty
Logic is insufficient in this way we do not need
probability.
We do not create probability tables if there is an
easier way.
Summary
• Bayesian networks are Directed Acyclic Graphs
• Each node corresponds to a random variable
• Each node has a conditional distribution, given its parents
• Bayesian networks can represent full joint probability
distributions, but can be
exponentially smaller by exploiting conditional
independence relations.
• Constructing Bayesian Networks takes advantage of the
chain rule, which is a
generalization of the product rule.
• Conditional distributions can be represented more compactly, e.g., by
making use of deterministic functions, probability density functions, or
discretization.
Discussion: Searle
Connectionism (symbolic vs. subsymbolic AI, parallel distributed processing) = a movement in cognitive science
that hopes to explain intellectual abilities using artificial neural networks. Symbolic AI = the term for the
collection of all methods in artificial intelligence research that are based on high-level symbolic (human-
readable) representations of problems, logic and search. In subsymbolic AI, Implicit representation is derived
from the learning from experience with no symbolic representation of rules and properties. Parallel
distributed processing = a type of information processing where large numbers of computing units perform
their calculations simultaneously. Computational units can receive and process multiple inputs and transmit
multiple outputs.
Behaviourism (and how it’s implicit in Strong-AI) = the theory that human and animal behaviour can be
explained in terms of conditioning, without appeal to thoughts or feelings. Behaviour is seen as the outward
expression of what goes on in the mind, so, according to the strong AI view, if a machine behaves as if it has
intelligence/a mind, then it must be intelligent/have a mind.
1. Some AI researchers believe that by finding the right program they will create a thinking, conscious
machine.
2. Searle’s Chinese room argument: Running the right program is not sufficient for a thinking machine.
3. The Chinese room runs the right program, but has no understanding of Chinese.
4. Searle is not arguing against the possibility of creating a thinking machine, he is arguing against the
idea that doing this is merely a matter of coming up with the right program.
5. If we are to construct thinking machines with consciousness, we also need to consider the nature of
the machinery that runs the program.
6. What kind of machinery do we need?
7. Will it ever be possible to “measure” consciousness?
4 counter arguments
The person in the room doesn’t understand Chinese, but the system as a whole does understand Chinese.
Searle is playing the role of a CPU, but the system has other components like a memory etc.
E.g., we don’t say the brain understands and feels love, we say that people understand and feel love.
• Searle’s response: The person in the room could internalize the whole system, and would still not
understand Chinese.
The person in the room doesn’t understand Chinese, but if the system were connected to the world like a
robot, with sensors etc, then it would understand Chinese. This would establish a causal connection between
the world and the structures being manipulated.
• Searle responds: All these sensors provide is information. There is no difference between this information
and information passed into the room in the form of questions.
What if the program precisely simulated the brain of Chinese speaker, including the neural architecture and
the state of every neuron. Then then the system would understand Chinese.
• Searle responds: Whatever system the person in the room is simulating, it will still only be a simulation.
The only way we attribute understanding to other people is through their behaviour. There is no other way.
Therefore, we must decide if we attribute understanding to machines in the same way, only through their
behaviour.
Searle responds: “The problem in this discussion is not about how I know that other people have
cognitive states, but rather what it is that I am attributing to them when I attribute cognitive states to
them.”
There is a difference: We know machines are just manipulating symbols without knowing what they
mean, but we are not sure about people.
Discussion: Ethics
1. Protecting us from AI: As AI penetrates deeper into society, what ethical and moral issues does this
pose?
2. Protecting the rights of AI systems: Should AI systems have moral status, and if so, when and why?
What are the implications?
Three scenarios
Because AGI aims at general abilities, AI systems of the future are likely to carry out tasks that we
didn’t design them for. Will they behave ethically when carrying out these tasks?
The moral/ethical implications of AGI systems need to be verified before they are deployed. How can
we do this? The systems must somehow think in the same way that trustworthy designer would.
Ethical cognitive considerations need to be made part of the engineering problem, rather than being
considered as an afterthought.
Do both need to be established for moral status?Non-discrimination principles when attributing moral status:
Principle of substrate non-discrimination: All else being equal, an agents sentience or sapience
should be judged independent of the physical substrate on which it is implemented.
Principle of ontogeny non-discrimination. All else being equal, an agents sentience or sapience
should be judged independently of the process that created the agent.
We need to be open minded about what kind of systems might possess sentience and sapience. The
notions of morality and ethics has always evolved, fitting the concerns of the time. This is likely to
continue, and AI may play a significant role in shaping future notions of ethics and morality.
Objective vs. subjective time: Should machines that think faster than us go to prison for a shorter
period of time?
Accelerated reproduction: Should machines that reproduce faster than others be subject to different
moral codes?
Two criteria are commonly proposed as being importantly linked to moral status, either
separately or in combination: sentience and sapience (or personhood). These may be
characterized roughly as follows:
We strongly agree with this proposal, simply because there is no other criteria relevant to
have a moral status.
“If two beings have the same functionality and the same conscious experience, and
differ only in the substrate of their implementation, then they have the same moral
status.”
Summary: AI and humans can have the same conscious experience. The only difference
between them is the material they are composed of.
For: The precondition of same functionality and same conscious experience are required
to make sure that the two entities have at least some common propensities and idea of
how the world is. This argument implies that difference in moral status does not arise
simply due to difference in substrate. If we have the presupposition that the theory of
mind we use to judge whether other humans have a conscious experience similar to us
does not necessarily depend upon their physical appearance, then the same is true for
entities other than humans if we have judged that they have similar conscious
experience. If a human consciousness is uploaded into a computer chip but still has the
same conscious experience judged by the functionality and propensities that they have,
then the same is true for an AI. Considerations other than moral status can be used to
differentiate, like we use among humans (family members vs strangers), simply not the
moral status itself.
Against: We will never know if an AI has the same conscious experience as a human,
because therefore we would need to be able to be the AI to experience what it is
experiencing. So it is impossible to compare experiences.
Initially, even if two people who experienced the same function and conscious experience
may not necessarily have the same morals, regardless of how they are put into practice.
Machines hence can encode an implicit similar algorithm as human functionality and
conscious experiences, but still an algorithm. It's just matrix multiplication at the end of
the day(no consciousness although we are unable to clearly define it). The author(s) of
how the Ai would conceive rules and moralities are conscious entities who carefully
consider their reactions and fully comprehend the inputs. Ai in this case is simply acting,
and even though they are “physically or consciously” there, a conscious has already
responded to those inputs morally.
“If two beings have the same functionality and the same consciousness experience, and
differ only in how they came into existence, then they have the same moral status.”
Summary: A being’s moral status is not affected by how it came into existence. The
moral standing of that being is not undermined, reduced, or altered by deliberate
design.So, The Principle of Ontogeny Non-Discrimination is consistent with the claim that
the creators or owners of an AI system with moral status may have special duties to their
artificial mind which they do not have to another artificial mind, even if the minds in
question are qualitatively similar and have the same moral status.
For: If two beings have the same consciousness experience and functionality therefore
they have the same quality of subjective experience and even same possibility of use.
Although they differ in how they came into existence they have the same moral status.
As an example I would provide: If we would make a human clone. The clone would not
remember its birth the same as we do not also it would have the exact same functions as
we do. Therefore the clone could think he is human. So if we would be able to find only
difference and it would be the way of birth we could argue if the clone is human but we
would have to assign the same moral status.
Against: AI shouldn’t have a moral status because it, while it can be argued it could
experience reality the same way humans do, does not have a brain, which is responsible
for consciousness and intelligence. People do not oppose causal factors such as assisted
delivery, in vitro fertilization, etc. in humans when deciding whether new humans
deserve a moral status, but they possess a brain which is the main prerequisite both for
sentience and sapience An AI cannot have a moral status in my opinion. First of all, it
cannot reproduce emotions like humans, they don’t feel pain, regret or sorrow after
being done wrong for example. Secondly AI machines don’t know what is morally wrong
or right. A human can for example deduct that stealing is wrong, but a machine cannot
decide that for itself, without human intervention.
“In cases where the duration of an experience is of basic normative significance, it is the
experience’s subjective duration that counts.”
Summary: The idea of whole brain emulation or “uploading” is the foundation of the
principle of the subjective rate of time. “Uploading” refers to the concept that one day
there will be invented a technology able to transfer human intelligence from its organic
form onto a digital computer. If uploaded to a faster computer the consciousness will
perceive the external world as if it were slowed down and therefore develop a subjective
sense of time that is moving faster than the actual time. From there arises the question
when judging time should we use the subjective perspective that the uploads have or
should we use the objective perspective that we all perceive.
For: I agree that humans and computers experience time differently and this time of
‘reflection’ sometimes is crucial. AI could experience time differently from humans, at
least in its uploading and processing of information (which it does much faster compared
to a human being). For example, humans are put into prison to reflect on what they have
done. This entails that fairness requires us to take subjective experiences into account.
Against:Time could not be viewed subjectively. Humans and AI may experience time
subjectively differently, but time can also be viewed subjectively differently between
humans. "Time flies when you're having fun", fits this well. Besides, it is not possible to
measure something subjective objectively. So it will be difficult to take subjective
experiences into account. Because of the experiential difference of time between people
themselves and between AI, it would be better to assume one objective tim