Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 ) On Probabilistic Search Algorithms: Implementing and Experimenting with Randomized Hill Climbing with Resampling Raunak Third Draft Implement a randomized hill climbing algorithm with
On Probabilistic Search Algorithms: Implementing and Experimenting with Randomized Hill Climbing with Resampling Raunak
Third Draft
Implement a randomized hill climbing algorithm with resampling, called RHCR in the following, and conduct a set of experiments, minimizing the following function f:
fFrogxy xcossqrtxysinsqrtyx
ysinsqrtxycossqrtyx
with xy
Your procedure should be called RHCR and have the following input parameters:
sp: is the starting point of the Randomized Hill Climbing ResamplingRHCR run
p: the number of neighbors of the current solution that will be generated
z: neighborhood size: for example, if z is set to z p neighbors for the current solution s are generated by adding vectors v z z with z and z being random numbers in uniformly distributed
seed: which is an integer that will be used as the seed for the random generator you employ in your implementation.
Figure : Visualization of fFrog
RHCR runs Randomized Hill Climbing times, using sp as the starting position for the first run, the result of the first run sol as the start position of the second run which uses a smaller neighborhood size of z and uses the result of the second run sol as the starting position of the third run which uses a much smaller neighborhood size of z returning sol RHCR returns sol sol and sol as well as fsolfsol and fsol and reports how often function f was called in the three runs of RHC and the total number of calls.
RHCRspzpseed;
solRHCspzpseed;
solRHCspzpsolseed;
solRHCspzpsolseed;
Return solfsolsolfsolsolfsol;
Algorithm: Pseudo code of RHCR@
Run your randomized hill climbing procedure RHCR twice for the following parameters:
sp
p and ; z and
REPORT
For each of the runs report:
a the best solution x y found and its value for f
b number of solutions generated during the run
Summarize your results in tables using the format depicted in Fig. ; one for each p and z combination see example below
Finally, run RHCR one more time with your preferred choice of values for sp p z and report the result; students, who find better solutions in this rd run will get more points for the rd run subtask.
Interpret the obtained results evaluating solution quality, algorithm speed, impact of sp p and z on solution quality and algorithm speed. Summarize and interpret the complexity of the RHCR runs!
Did the resampling option lead to better solutions? Do you believe with other values for p and z better results could be accomplished? Finally, assess if RHCR did a good, medium, or bad job in computing a local minimum for f
pz for sp
p & z Run
Run
Number of solutions searched in the first, second and third run of RHC and the sum of the numbers
in
S s
Result fsolfsolfsol Bes F
p & z
p & z
p & z
Fig. : Table Template to report the results of the runs of RHCR
You should summarize your results in tables formatted as the above, for each of the combinations of p & z Dont forget to summarize the results of your rd run and to provide the other information asked for in the task specification!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started