Assignment on IF ELSE statement

Project 5 help problems 2-8
Hello I need help with fixing my project and I also need help with questions 2-8 for project 5 as well.This is what I need to correct for the project here was the issueas soon as I click start, the timer starts at 29 seconds, not 30 seconds. This is where you will need to adjust your counter in the timer function, and place it after the script that updates the phrase on your page.

Also, you will want to set up an IF ELSE statement within your timer. Example:For your setTimeouts, you will want to assign it to a variable. That way you can clear it (stop it) in the last project. If you do not assign it to a variable, you will not have a way to stop it. Thus will cause it to run dynamically after the game is over.Your gamespace is a little too small compared to the size of bubble. I would make the gamespace around 600px width and height of 350px.Not sure about using a soccerball for the cursor. It does not fit the overall theme. Maybe a cursor that looks like a target. https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcR61leTxKEg7AzYlOyl2NvsjItDePz6ChDWwg&usqp=CAUThen when it comes to project 5 it should do the following after it is completedBy then end of this project, the game should do the following:I would need it to be completed by Friday before midnight.

Don't use plagiarized sources. Get Your Custom Essay on
Assignment on IF ELSE statement
Just from $10/Page
Order Essay

Project 5 Instructions
1. Copy ALL of the contents in the csci2447/project4 folder into the csci2447/project5
folder. This ensures that you will not overwrite your work for the previous project. You
will do this for each project from here on out. If you do not do this, there is no way for
me to grade your previous project.
2. In the last project, you created an addImage() function which added the image to
#gamespace. This worked well but each time it is called, it replaced the image which
was already in there with a new one. We want to preserve the images already in the
#gamespace. Change your use of .html() in addImage() to .append(). If already using
.append(), no need to make a change.
3. Now we will try to make the images appear randomly around the gamespace. To do so,
you will need to utilize the position style. For more info on position, check out:
https://www.w3schools.com/css/css_positioning.asp First, add the following code to
your game.css file. This will allow us to use the “top” and “left” CSS styles on the IMG
tag.
div#gamespace img { position: absolute; }
And add the following property to div#gamespace:
div#gamespace { position: relative; }
4. To randomly move each image, you will need to call your random number functions!
Call each function once in the addImage() function and save the returned value to a
variable (eg. xPos and yPos). Now that you have two random values, you will need to
add a “style” attribute to the IMG tag. For example:
<img src=”img/balloon.png” style=” left: 10px; top: 100px;”>
In this “style” attribute, you will need to add a “left” and “top” property. The values for
each property will be your random numbers. Most students will have issues placing the
quotation marks. To help you, a website to help better understand this:
https://www.digitalocean.com/community/tutorials/how-to-work-with-strings-in-javascript
Tweak the values of your random function to make the images stay within the
#gamespace.
Hint: The actual value would be stored within a variable. You will call the function to
run, and have the value stored within a variable. You will place the variable within the
line of code where the value is to be added.
5. When the image is clicked, it should disappear. To do this, add a line of code to your
.on() function that makes image disappear when clicked. Note: There are a variety of
methods that will allow you to do so in jQuery, and jQuery UI.
6. Turn off the click of the start button once it has been clicked. You can use the .off()
function to turn off the click. Once the game has started, you do not want the gamer to
be able to click on the start button again.
7. Randomize the time interval in which new images appear. Currently, it is set to a static
2000 (2 seconds). The interval should vary between 0 and 2000 at random. You may
create a new random function like your random x and y functions, if you like. Images
should now appear at random intervals!
8. Incorporate at least one widget, or effects from jQueryUI. Make sure to document which
area by adding a comment within the script. Example: You might create a tab widget.
One tab will have the game and the other tab will have the instructions.
9. Upload the contents of your project folder public_html/csci2447/project5/ folder.
10.Submit the complete URL of this work to this Blackboard assignment in the
“Submission” text field.
11.A correctly formatted URL should look
like http://citwebdev.cscc.edu/~username/csci2447/project5/ where username is your
CSCC username.

 

Installation and setup
Installing python 3
Go to https://www.python.org/downloads/ to download python 3. Alternatively, you can install a python
distribution such as Anaconda. Please select python 3 (not python 2).
Installing the dependencies
Install all dependencies using
python3 -m pip install -r requirements.txt
Note: On some systems, you might be required to use pip3 instead of pip for python 3.
If you’re using conda use
conda env create environment.yml
The test grader will not have any dependencies installed, other than native python3 libraries and libraries
mentioned in requirements.txt. This includes packages like pandas. If you use additional dependencies ask on
piazza first, or risk the test grader failing.
Manual installation of pytorch
Go to https://pytorch.org/get-started/locally/ then select the stable Pytorch build, your OS, package (pip if you
installed python 3 directly, conda if you installed Anaconda), python version, cuda version. Run the provided
command. Note that cuda is not required, you can select cuda = None if you don’t have a GPU or don’t want to do
GPU training locally. We will provide instruction for doing remote GPU training on Google Colab for free.
Manual installation of the Python Imaging Library (PIL)
The easiest way to install the PIL is through pip or conda.
python3 -m pip install -U Pillow
There are a few important considerations when using PIL. First, make sure that your OS uses libjpeg-turbo and not
the slower libjpeg (all modern Ubuntu versions do by default). Second, if you’re frustrated with slow image
transformations in PIL use Pillow-SIMD instead:
CC=”cc -mavx2″ python3 -m pip install -U –force-reinstall Pillow-SIMD
The CC=”cc -mavx2″ is only needed if your CPU supports AVX2 instructions. pip will most likely complain a bit
about missing dependencies. Install them, either through conda, or your favorite package manager (apt, brew, …).
Running your assignment on google colab
You might need a GPU to train your models. You can get a free one on google colab. We provide you with a
ipython notebook that can get you started on colab for each homework.
If you’ve never used colab before, go through colab notebook (tutorial)
When you’re comfortable with the workflow, feel free to use colab notebook (shortened)
Follow the instructions below to use it.
• Go to http://colab.research.google.com/.
• Sign in to your Google account.
• Select the upload tab then select the .ipynb file.
• Follow the instructions on the homework notebook to upload code and data.

 

 

starter code In this homework, we will train a CNN to do vision-based driving in SuperTuxKart. We will design a simple low-level controller that acts as an auto-pilot to drive in supertuxkart. We then use this auto-pilot to train a vision-based driving system. To get started, first download and install SuperTuxKart on your machine.
python3 -m pip install -U PySuperTuxKart When running the simulator, if you encountered errors about irrlicht devices, make sure you have EGL installed, also try using the following environment variables: IRR_DEVICE_TYPE=x11 or IRR_DEVICE_TYPE=sdl. You can install EGL using conda install -c anaconda mesa-libegl-cos6-x86_64 if you are using conda.
Controller In the first part of this homework, you’ll write a low-level controller in controller.py. The controller function takes as input an aim-point and the current velocity of the car. The aim-point is a point on the center of the track 15 meters away from the kart, as shown below. We use screen coordinates for the aim-point: [-1..1] in both x and y directions. The point (-1,-1) is on the top left, (1, 1) the bottom right. In the first part of this assignment, we will use a ground truth aim-point from the simulator itself. In the second part, we remove this restriction and predict the aim-point directly from the image. The goal of the low-level controller is to steer towards this point. The output of the low-level controller is a pystk.Action. You can specify:
• pystk.Action.steer the steering angle of the kart normalized to -1 … 1
• pystk.Action.acceleration the acceleration of the kart normalized to 0 … 1
• pystk.Action.brake boolean indicator for braking
• pystk.Action.drift a special action that makes the kart drift, useful for tight turns
• pystk.Action.nitro burns nitro for fast acceleration Implement your controller in the control function in controller.py. You won’t need any deep learning to design this low-level controller. You may use numpy instead of pytorch for this part. Once you finish, you could test your controller using python3 -m homework.controller [TRACK_NAME] -v You should tune the hyper-parameters of your controller. You might want to look into gradient-free optimization or exhaustive search. The reference controller completes each level relatively efficiently: zengarden and lighthouse in under 50 sec, hacienda and snowtuxpeak in under 60 sec, cornfield_crossing and scotland in under 70 sec. Grade your controller using python3 -m grader homework
Hint: Skid if the steering angle is too large
Hint: Target a constant velocity
Hint: Use the aim-point to compute the absolute steering angle, learn or tune a scaling factor between absolute and normalized steering.
Planner In the second part, you’ll train a planner to predict the aim-points. The planner takes as input an image and outputs the aim-point in the image coordinate. Your controller then maps those aim-points to actions.
Data Use your low-level controller to collect a training set for the planner. python3 -m homework.utils zengarden lighthouse hacienda snowtuxpeak cornfield_crossing scotland We highly recommend you limit yourself to the above training levels, adding additional training levels may create an unbalanced training set and lead to issues with the final test_grader. This function creates a dataset of images and corresponding aim-points in drive_data. You can visualize the data using python3 -m homework.visualize_data drive_data
Model Implement your planner model in Planner class of planner.py. Your planner model is a torch.nn.Module that takes as input an image tensor and outputs the aiming point in image coordinates (x:0..127, y:0..95). We recommend using an encoder-decoder structure to predict a heatmap and extract the peak using a spatial argmax layer in utils.py. Complete the training code in train.py and train your model using python3 -m
homework.train.
Vision-Based Driving Once you completed everything, use
python3 -m homework.planner [TRACK_NAME] -v to drive with your CNN planner and controller.
Grading We will grade both your controller and planner in the following 6 tracks
• hacienda
• lighthouse
• cornfield_crossing
• scotland
• zengarden
• snowtuxpeak Your controller/planner should complete each track within a certain amount of time. You receive 5% of your grade by completing each track with your low-level controller. You receive 10% of your grade by completing each track with your image-based agent. You may train on all the above testing track. For the last 10%, you’ll need to complete an unseen test track. We chose a relatively easy test track. You can test your solution against the grader by
python3 -m grader homework
Extra credit (up to 10pt) We will run a little tournament with all submissions, the top 9 submissions will receive 10, 9, 8, … extra credit respectively. The tournament uses several unreleased test tracks.
Submission (ID is 3849) Once you finished the assignment, create a submission bundle using
python3 bundle.py [YOUR ID] and submit the zip file online. If you want to double-check that your zip file was properly created, you can grade it again
python3 -m grader [YOUR ID].zip
Grading The test grader we provide
python3 -m grader homework -v will run a subset of test cases we use during the actual testing. The point distributions will be the same, but we will use additional test cases. More importantly, we evaluate your model on the test set. The performance on the test grader may vary. Try not to overfit to the validation set too much.
Online grader We will use an automated grader to grade all your submissions. There is a limit of 5 submissions per assignment. The online grading system will use a slightly modified version of python and the grader:
• Please do not use the exit or sys.exit command, it will likely lead to a crash in the grader
• Please do not try to access, read, or write files outside the ones specified in the assignment. This again will lead to a crash. File writing is disabled.
• Network access is disabled. Please do not try to communicate with the outside world.
• Forking is not allowed!
• print or sys.stdout.write statements from your code are ignored and not returned.
Running your assignment on google colab You might need a GPU to train your models. You can get a free one on google colab. We provide you with an ipython notebook that can get you started on colab for each homework. If you’ve never used colab before, go through colab notebook (tutorial) When you’re comfortable with the workflow, feel free to use colab notebook (shortened) Follow the instructions below to use it.
• Go to http://colab.research.google.com/.
• Sign in to your Google account.
• Select the upload tab then select the .ipynb file.
• Follow the instructions on the homework notebook to upload code and data.

Get professional assignment help cheaply

Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?

Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.

Our essay writers are graduates with diplomas, bachelor, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.

Why choose our academic writing service?

  • Plagiarism free papers
  • Timely delivery
  • Any deadline
  • Skilled, Experienced Native English Writers
  • Subject-relevant academic writer
  • Adherence to paper instructions
  • Ability to tackle bulk assignments
  • Reasonable prices
  • 24/7 Customer Support
  • Get superb grades consistently

 

 

 

 

 

 

Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

We value our customers and so we ensure that what we do is 100% original..
With us you are guaranteed of quality work done by our qualified experts.Your information and everything that you do with us is kept completely confidential.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

The Product ordered is guaranteed to be original. Orders are checked by the most advanced anti-plagiarism software in the market to assure that the Product is 100% original. The Company has a zero tolerance policy for plagiarism.

Read more

Free-revision policy

The Free Revision policy is a courtesy service that the Company provides to help ensure Customer’s total satisfaction with the completed Order. To receive free revision the Company requires that the Customer provide the request within fourteen (14) days from the first completion date and within a period of thirty (30) days for dissertations.

Read more

Privacy policy

The Company is committed to protect the privacy of the Customer and it will never resell or share any of Customer’s personal information, including credit card data, with any third party. All the online transactions are processed through the secure and reliable online payment systems.

Read more

Fair-cooperation guarantee

By placing an order with us, you agree to the service we provide. We will endear to do all that it takes to deliver a comprehensive paper as per your requirements. We also count on your cooperation to ensure that we deliver on this mandate.

Read more

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Open chat
1
You can contact our live agent via WhatsApp! Via +1 817 953 0426

Feel free to ask questions, clarifications, or discounts available when placing an order.

Order your essay today and save 20% with the discount code VICTORY