Lecture 12 - Stochastic Optimisation Part 2 Flashcards

1
Q

What is Hill Climbing?

A

Hill Climbing is a local search algorithm used in optimisation and artificial intelligence. It is designed to find better solutions by iteratively modifying a current candidate solution and moving to a new one only if it improves the objective function (e.g., fitness, score, cost, etc.).

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

What are the avantages/disadvantages of Hill Climbing?

A

Advantages of Hill Climbing
* Simple and intuitive.
* Efficient for well-behaved landscapes with smooth, single-peak optima.
* Doesn’t require gradient info → suitable for black box optimisation.

Limitations
* Local optimum trap: It only accepts improvements — may get stuck in a local maximum and never find the global one.
* No mechanism to backtrack or explore distant areas unless randomness is used more aggressively (e.g., simulated annealing or restarts).

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

Basic Hill Climbing Algorithm

A

REFER TO SLIDES

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

What are the Trade-Off’s of the Basic Hill Climbing Algorithm

A
  • The Trade-Off It Mentions:
    ○ More samples (n) = better approximation of the steepest direction.
    ○ But also = higher computational cost.
    ○ So there’s a balance between exploration quality and resource usage.
    • This is a fundamental concern in metaheuristics and optimisation design.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Steepest Ascent Hill Climbing?

A

Steepest Ascent Hill Climbing is a local search algorithm that improves on basic Hill Climbing by generating multiple tweaked versions of the current solution, evaluating all of them, and picking the best one — the one that represents the “steepest uphill” move.

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

What is the difference between Hill Climbing and Steepest Ascent Hill Climbing?

A

Hill Climbing:
Tweaks once per iteration
Accepts first better solution
more oppotunistic
May miss steepest ascent
=====
Steepest Ascent Hill Climbing:
Tweaks n times per iteration
Picks the best of all tweaked iteration
More informed and selective
Aims to approximate steepest ascent without using gradients

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

Steepest Ascent Hill Climbing Algorithm - Algorithm 5 and Steepest Ascent Hill Climbing Algorithm with Replacement - Algorithm 6

A

REFER TO SLIDES

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

What is the Nomenclature of Three Different Hill Climbing models

A

Model 1 - Basic Hill Climbing : uses a 1+1 algorithm
Model 2 - Steepest Ascent Hill Climbing : uses a 1 + n algorithm
Model 3 - Steepest Ascent Hill Climbing with Replacement: uses a (1, n) algorithm

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

What is Model 1 - Basic Hill Climbing : uses a 1+1 algorithm

A

Starts with one existing solution and generate 1 new candidate solution by tweaking, then compare the two and pick the better one

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

What is Model 2 - Steepest Ascent Hill Climbing : uses a 1 + n algorithm

A

Start with one exisitng, generate n solutions by tweaking multiple times
Then select the best among the n candidates + the exisiting

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

What is Model 3 - Steepest Ascent Hill Climbing with Replacement: uses a (1, n) algorithm

A

Start with one existing, generate n new solutions but do not include the exisiting, you only select among the n values

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

What is a Parameterised Model?

A

A model whose behavior is controlled by a set of parameters
REFER TO NOTES FOR DIAGRAM AND ITS EXPLANATION

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

Why do we use Real-Valued Parameters?

A

Why Use Real-Valued Parameters?
- “Numerical parameters are nice to work with.”

This is because real numbers allow for:
* Smooth and continuous modifications (e.g., adding small amounts of noise).
* Use of mathematical operations for tweaking (e.g., v_i ← v_i + noise).
* Easy application of probabilistic tweaks (e.g., Gaussian or uniform random noise).

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

How does Tweaking work with Parameterised models?

A
  • You can tweak a solution by adding a small random number to one or more parameters.
    • This is useful in black box settings where:
      • You can’t compute derivatives (gradients),
      • But you can still explore the search space by making small adjustments to parameters.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a Hyperparameter?

A

a parameter whose value is set before the learning process begins, influencing how the model is trained and its overall performance

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

Why are Hyperparameters important?

A

Hyper-parameters determine:
* How well the algorithm works.
* How fast it converges.
* Whether it works at all.
=====
They can be thought of as tuning knobs you use to adjust the algorithm’s behaviour depending on:
* The problem domain.
* The shape of the solution space.
The available computational resources.

17
Q

How are Hyperparameters used in Hill Climbing?

A

Depends on the size of n:
Small n:
- Fast and fewer evaluations
- May miss best direction
- Lower computation cost
===
Large n:
- Slower, more evaluations
- Better guess fo best direction
- Higher computation cost

18
Q

What is Initialisation?

A

Before your algorithm can start tweaking and improving solutions, it needs a starting point.
* This could be:
○ A random vector (common in black-box and stochastic settings).
○ A heuristic-based guess.
○ A hand-crafted initial solution (if you have domain knowledge).

19
Q

How is Initialisation used in Hill Climbing?

A

to Initialise a candidate solution

20
Q

Algorithm 7 - generate a random real number and what does it do

A

REFER TO NOTES FOR CODE
This algorithm produces a vector v⃗ = [v₁, v₂, …, vₗ] where each element is:
* Chosen randomly between min and max, using a uniform distribution.
Why it matters:
* It gives you a diverse starting point.
* If done well, it helps the search begin in a good region of the solution space.
Random initialisation ensures exploration from different regions if restarts are used.

21
Q

Algorithm 8 - Bounded Uniform Convolution

A

REFER TO NOTES FOR CODE
What it does:
* Iterates through each element of a vector.
* With probability p, adds small uniform noise from range [-r, r] to that element.
* Makes sure the new value stays within min and max bounds.
Why it matters:
* Controls the aggressiveness of your tweaks.
* Ensures solutions stay valid (within bounds).
* Introduces stochastic variation without being too disruptive.

22
Q

What is Exploitation?

A

Focuses on local improvement
Fine tunes existing good solutions
Helps converge to a nearby/local optimum

23
Q

What is Exploration?

A

Searches for new, potentially areas
Jumps to new regions of the search space
Helps discover the global optimum

24
Q

How is Exploitation and Exploration controlled?

A

Parameters:
* p: Probability of tweaking each element of the vector.
* r: The half-range of the noise added (how big a tweak can be).
Together, they determine the step size of the algorithm — that is, how far each tweak moves in the solution space.
NOTE: r is especially important here because it directly affects how “aggressive” the movement is.

Typically using small or large step sizes

25
How is Exploitation and Exploration controlled - Small Step Size?
Controlled by: - Low r: Small tweaks. - Possibly low p: Few dimensions change at a time. Characteristics: - Moves carefully in small increments ("tiptoe to the top of the hill"). - Focuses on refining or improving the current good solution. - Likely to converge nicely to a local optimum. - But: Less likely to escape if that local optimum isn’t the global best. You’re “zooming in” on where you are, not looking around elsewhere.
26
How is Exploitation and Exploration controlled - Large Step Size?
Controlled by: - High r: Large tweaks. - Possibly high p: Many dimensions change at once. Characteristics: - Makes big jumps — “leaps and bounds”. - Can overshoot good solutions. - More likely to escape local optima and potentially reach the global optimum. - But: May make it harder to settle on a peak (keeps jumping over the best spot). You’re “scanning the map” instead of zooming in.
27
What is the Tradeoff of Exploitation and Exploration
* This trade-off is called the exploration vs exploitation dilemma. * You want to: ○ Explore enough to find good solutions globally. ○ Exploit enough to refine those solutions effectively. * But it's hard to do both well at the same time.
28
What is At the Limit theory?
* "At the limit": In theory, if a global optimiser runs infinitely long and explores every possible point, it will find the global best.
29
What is Bounded Tweak Problem?
* Bounded tweak problem: Algorithms that only make small changes (bounded tweaks) can't guarantee visiting the entire space, so they can’t guarantee global optimality.
30
Algorithm 9 - Random Search
REFER TO NOTES
31
Random Search VS Hill Climbing
Random Search: Global Optimisation Explore everywhere Stores best so far No tweaks, full re-sample Will find Globla optima eventually Slow convergence rate === Hil climbing: Local optimisation Exploit current best Builds upon previous results Is tweake based - modifies current solution Can gget stuck in local optima (cant find Global) Faster convergence rate
32
What are the different techniques for converting a local search algorithminto one capable of global search?
Adjust the Modification Procedure Adjust the Selection Procedure “Hyperjumps” or Restarts
33
What is Adjust the Modification Procedure?
Occasionally allow large tweaks that jump to different areas in the solution space. This makes the algorithm occasionally explore faraway regions, improving global search.
34
What is Adjust the Selection Procedure?
Traditional hill climbing always selects the better candidate (greedy selection). A global algorithm can: Sometimes accept worse solutions, which helps escape local optima.
35
What is “Hyperjumps” or Restarts?
Occasionally restart from a completely new random point. A simple but powerful trick to avoid stagnation in local optima.
36
How do Sampling-based strategies guide the design of global algorithms and its tradeoff
Instead of tweaking once per iteration, sample many candidates The tradeoff is larger samples improve quality but are computationally expensive
37
What questions should you ask about larger samples?
Sould you pick best, second best or sample again? How should you sample? When does sampling cost more than searching?