Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
COMP3620/6320 Articial Intelligence Assignment 3: SAT-Based Planning
18.1 The basics
1. Plot the sine and cosine functions from 0 to 2π.
2. Write a function to plot an ellipse:
x = a cos(a) cos(B) – bsin(a) sin(B)
ly = a sin(a) cos(β) + bcos(a) sin(β) where–2π≤βS2π
and a is the rotation angle of the ellipse.
1. Using geostats’ countQuakes function (section 17.1.13), plot the declustered earthquakes of magnitude 4.5 and greater from 2000 to 2016 as a bar plot, and as a histogram.
2. Generate two samples (A and B, say) of 100 random numbers between 0 and 1; calculate the ratios A/B and B/A; and create a 2 x 2 figure with KDEs and rug plots of A/B, B/A,In(A/B) and ln(B/A).
3. Create a bivariate (x, y) dataset of 1000 random uniform numbers where -1≤x≤+1 and 2< y≤22. Construct a 2-dimensional KDE for these data.
4. Plot the ECDFs of the x and y values of the previous exercise. What fraction of the x-values is less than 0? What fraction of the y-values is less than 7? And less than 17?
18.3 Summary statistics
1. Calculate the means and variances of the Anscombe quartet, and store them in a 2 X 4 matrix.
2. Generate n = 10 random numbers between 0 and 1. Calculate their mean. Repeat 100 times and store the mean values in a 100-element vector. Compute the mean and standard deviation of this vector. Repeat for n = 100, 1000 and 10000.
3. Generate 1000 random numbers between 0 and 200. Count the number of values that are less than 1. Repeat 500 times to fill a vector of counts. Compute the mean and variance of this vector.
4. Generate two samples (A and B) of 100 random numbers between 0 and 1, and calculate their logratio ln(A/ B). Repeat 10 times and visualise the results as a box plot.
18.4 Probability
1. The International Geo Sample Number (IGSN) is an alphanumeric code that is used to identify geological rock specimens in the scientific literature. It consists of up to five letters to identify the owner of the sample, followed by four characters (letters or numbers) to identify the sample itself. Examples are PVERM1234 and UCL001B. How many sampes can each owner register? How many possible IGSNs are there in total?
2.20 students are taking part in a mapping exercise. How many ways are there to divide them into 4 distinct groups of 5?