Answered step by step
Verified Expert Solution
Link Copied!

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

1) 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 RHCR2 in the following, and conduct a set of experiments, minimizing the following function f:
fFrog(x,y)= xcos(sqrt(|x+y+1|))sin(sqrt(|yx+1|))+
(1+y)sin(sqrt(|x+y+1|))cos(sqrt(|yx+1|))
with x,y[512,512]
Your procedure should be called RHCR2 and have the following input parameters:
sp: is the starting point of the Randomized Hill Climbing Resampling2(RHCR2) 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=10, p neighbors for the current solution s are generated by adding vectors v =(z1, z2) with z1 and z2 being random numbers in [-10,+10] uniformly distributed
seed: which is an integer that will be used as the seed for the random generator you employ in your implementation.
Figure 2: Visualization of fFrog
RHCR2 runs Randomized Hill Climbing 3 times, using sp as the starting position for the first run, the result of the first run sol1 as the start position of the second run which uses a smaller neighborhood size of z/20, and uses the result of the second run sol2 as the starting position of the third run which uses a much smaller neighborhood size of z/400, returning sol3. RHCR2 returns sol1, sol2, and sol3 as well as f(sol1),f(sol2) and f(sol3) and reports how often function f was called in the three runs of RHC and the total number of calls.
RHCR2(sp,z,p,seed);
sol1=RHC(sp,z,p,seed);
sol2=RHC(sp,z/20,p,sol1,seed);
sol3=RHC(sp,z/400,p,sol2,seed);
Return {(sol1,f(sol1)),(sol2,f(sol2)),(sol3,f(sol3))};
Algorithm1: Pseudo code of RHCR@
Run your randomized hill climbing procedure RHCR2 twice for the following parameters:
sp =(-300,-400),(0,0),(-222,-222),(-510,400)
p =120 and 400; z =9 and 50
REPORT
1. For each of the 32 runs report:
a. the best solution (x, y) found and its value for f
b. number of solutions generated during the run .
2. Summarize your results in 4 tables using the format depicted in Fig. 2; one for each p and z combination (see example below).
3. Finally, run RHCR2 one more time with your preferred choice of values for sp, p, z, and report the result; students, who find better solutions in this 33rd run will get more points for the 33rd run subtask.
4. 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 RHCR2 runs!
5. 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 RHCR2 did a good, medium, or bad job in computing a (local) minimum for f.
p/z for sp =(-300,-400),
p=120 & z=9 Run1
Run2
Number of solutions searched in the first, second and third run of RHC, and the sum of the 3 numbers
in
S s
Result f(sol1),f(sol2),f(sol3)... Bes ... F ...
p=120 & z=50
p=400 & z=9
p=400 & z=50
Fig. 3: Table Template to report the results of the 33 runs of RHCR2
You should summarize your results in 4/8 tables formatted as the above, for each of the 4 combinations of p & z. Dont forget to summarize the results of your 33rd 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

Compare the current team to the ideal team.

Answered: 1 week ago

Question

Write the difference between sexual and asexual reproduction.

Answered: 1 week ago

Question

What your favourite topic in mathematics?

Answered: 1 week ago

Question

Briefly describe vegetative reproduction in plants.

Answered: 1 week ago

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago