Design an algorithm that determines where your cars

Assignment Help Computer Engineering
Reference no: EM132176716

Foundations of Artificial Intelligence Homework - CORRECTED, CLARIFIED, AND DEADLINE EXTENDED

Problem Description: You are the CTO of a new startup company, SpeedRacer, and you want your autonomous cars to navigate throughout the city of Los Angeles. The cars can move North, South, East, or West. The city can be represented in a grid, as below:

0, 0

1, 0

2, 0

3, 0

4, 0

0, 1

1, 1

2, 1

3, 1

4, 1

0, 2

1, 2

2, 2

3, 2

4, 2

0, 3

1, 3

2, 3

3, 3

4, 3

0, 4

1, 4

2, 4

3, 4

4, 4

There will be some obstacles, such as buildings, road closings, etc. If a car crashes into a building or road closure, SpeedRacer has to pay $100. You know the locations of these, and they will not change over time. You also spend $1 for gas each time you move. The cars will start from a given SpeedRacer parking lot, and will end at another parking lot. When you arrive at your destination parking lot, you will receive $100. Your goal is to make the most money1 over time with the greatest likelihood. Your cars have a faulty turning mechanism, so they have a chance of going in a direction other than the one suggested by your model. They will go in the correct direction 70% of the time (10% in each other direction, including along borders).

The first part of your task is to design an algorithm that determines where your cars should try to go in each city grid location given your goal of making the most money. Then, to make sure that this is a good algorithm when you present it to the rest of your board, you should simulate the car moving through the city grid. To do this, you will use your policy from your start location. You will then check to see if the car went in the correct direction using a random number generator with specific seeds to make sure you can reproduce your output. You will simulate your car moving through the city grid 10 times using the random seeds 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.

You will report the mean over these 10 simulations as an integer after using the floor operation (e.g., numpy.floor(meanResult)). An example of this process is attached.

Input: The file input.txt in the current directory of your program will be formatted as follows:

  • First line: strictly positive 32-bit integer s, size of grid [grid is a square of size sxs].
  • Second line: strictly positive 32-bit integer n, number of cars.
  • Third line: strictly positive 32-bit integer o, number of obstacles.
  • Next o lines: 32-bit integer x, 32-bit integer y, denoting the location of obstacles.
  • Next n lines: 32-bit integer x, 32-bit integer y, denoting the start location of each car.
  • Next n lines: 32-bit integer x, 32-bit integer y, denoting the terminal location of each car.

Output:

n lines: 32-bit integer, denoting the mean money earned in simulation for each car, integer result of floor operation.

Note that although we would like to make the most money possible, you MUST use the parameters we provide to make sure everyone gets the same value. Other parameters may give better results, but you should not use them. You SHOULD use an approach we learned in class to make sure you get the same value.

Rules -

1. Use Python 2.7 to implement your homework assignment. You are allowed to use standard libraries only. You have to implement any other functions or methods by yourself.

2. Create a file named "hw3cs561f2018.py". When you submit the homework on labs.vocareum.com, the following commands will be executed: python hw3cs561f2018.py

3. Create a file named "output.txt" and print its output there. For each test case, the grading script will put an "input.txt" file in your work folder, runs your program (which reads "input.txt"), and check the "output.txt" file generated by your code. The grading script will replace the files automatically, so you do NOT need to do anything for that part.

4. Homework must be submitted through Vocareum. Please only upload your code to the "/work" directory. Don't create any subfolder or upload any other files.

5. Your program must handle all test cases within a maximum runtime of 3 minutes per test case on Vocareum.

Attachment:- Assignment Files.rar

Reference no: EM132176716

Questions Cloud

What makes public organizations unique : How do organizations formulate goals, and how does that impact effective outcomes? What makes public organizations unique?
What is triple bottle line reporting : What is triple bottle line reporting? What is involved in monitoring and reviewing operational performance?
Interviews based on leadership business communication : Summary of professional interviews based on leadership business communication.
Mopani strategy to introduce risk appetite statement : With reference to the mining industry, how would you judge mopani’s strategy to introduce risk appetite statement? Is this strategy likely to be successful?
Design an algorithm that determines where your cars : CSCI561 Foundations of Artificial Intelligence Homework - CORRECTED, CLARIFIED, AND DEADLINE EXTENDED. Design an algorithm that determines where your cars
Reasonable care in bailment scenario depends on bailment : Reasonable care in a bailment scenario depends on the bailment's. A compliance "red flag" might be an employee who never uses vacation or sick time.
Benefits of nationwide readmissions database : What are the benefits of nationwide readmissions database (NRD)? Does your healthcare organization use it and if so, why?
Describe the bene?ts of pipelined parallelism : Describe the bene?ts and drawbacks of pipelined parallelism. Explain the difference between data replication in a distributed system and the maintenance.
Identify example of development project : Can you identify an example of a development project and what type of team you believed they used?

Reviews

len2176716

11/25/2018 11:22:53 PM

This is a programming assignment. You are provided sample input and output files. Please understand that the goal of these samples is to check that you can correctly parse the problem definitions, and generate a correctly formatted output. The samples are very simple and it should not be assumed that if your program works on the samples it will work on all test cases. There will be more complex test cases and it is your task to make sure that your program will work correctly on any valid input. You are encouraged to try your own test cases to check how your program would behave in some complex special case that you might think of. Since each homework is checked via an automated A.I. script, your output should match the specified format exactly. Failure to do so will most certainly cost points. The output format is simple and examples are provided. You should upload and test your code on vocareum.com, and you will submit it there.

len2176716

11/25/2018 11:22:46 PM

Note that although we would like to make the most money possible, you MUST use the parameters we provide to make sure everyone gets the same value. Other parameters may give better results, but you should not use them. You SHOULD use an approach we learned in class to make sure you get the same value.

len2176716

11/25/2018 11:22:38 PM

Grading - Your code will be tested as follows: Your program must not require any command-line argument. It should read a text file called “input.txt” in the current directory that contains a problem definition. It should write a file “output.txt” with your solution to the same current directory. Format for input.txt and output.txt is specified below. End-of-line character is LF (since Vocareum is a Unix system and follows the Unix convention). The grading A.I. script will Create an input.txt file, delete any old output.txt file. Run your code. Test your output.txt file.

len2176716

11/25/2018 11:22:31 PM

Use Python 2.7 to implement your homework assignment. You are allowed to use standard libraries only. You have to implement any other functions or methods by yourself. Create a file named “hw3cs561f208.py”. When you submit the homework on labs.vocareum.com, the following commands will be executed: python hw3cs561f201.py. Create a file named “output.txt” and print its output there. For each test case, the grading script will put an “input.txt” file in your work folder, runs your program (which reads “input.txt”), and check the “output.txt” file generated by your code. The grading script will replace the files automatically, so you do NOT need to do anything for that part.

len2176716

11/25/2018 11:22:25 PM

Homework must be submitted through Vocareum. Please only upload your code to the “/work” directory. Don’t create any subfolder or upload any other files. Your program must handle all test cases within a maximum runtime of 3 minutes per test case on Vocareum. It is recommended to submit your program 24 hours ahead of the deadline to avoid any submission issues on Vocareum. Late submissions will not be graded.

len2176716

11/25/2018 11:22:20 PM

Helpful Hints: Tie breaking. If values are the same for your available moves, choose to move in directions in this order of preference: North, South, East, West. Cars can be in the same grid cell at the same time. There is no need to consider multi-agent coordination. Calculating expected value. When considering future moves, make sure to give them a lesser weight, specifically 0.9. You can stop calculating based on an error factor of 0.1. (HINT: These are parameters for your algorithm.) What if a car ends up turning “off grid” during simulation? The car should just remain in the current cell, but will spend another $1 on gas.

Write a Review

Computer Engineering Questions & Answers

  Which of these malicious software has been more devastating

Which of these malicious software has been more devastating recently and how could it be prevented or contained?

  Discuss the use of cryptosystems in modern industry

In the last discussion session, we "discuss the use of cryptosystems in modern industry." In this session, lets look at the advancement of quantum cryptosystems

  Protecting the operating systems

Explain the relative benefit and de-merits of at least three different measures that are used in order to protect the operating systems.

  Develop hardware block diagram of a multiplexer channel

Develop a complete hardware block diagram of a multiplexer channel. List the micro operations of each block in the diagram.

  Repeat part a for in v shift rows transformation

Repeat Part a for In v Shift Rows transformation. Using results of Parts a and b, prove that the Shift Rows and In v Shift Rows transformations are inverses.

  The wbfk transport company operates throughout mainland

the wbfk transport company operates throughout mainland australia. the company specialize in fast delivery of

  Discuss details of firewall settings you plan to implement

Be sure to discuss the details of firewall settings you plan to implement, browser privacy and security settings, and recommended software you will install.

  Discuss the efficiency and performance gains

Discuss the Ease of implementation, Efficiency and performance gains, Volume of data concerns, Security issues and Synchronization of distributed data.

  Give a scenario that can cause lost heap-dynamic variables

Give a scenario that can cause lost heap-dynamic variables. Support your scenario with sample codes in your favorite language.

  Write a program to implement the basic ray-tracing algorithm

Write a program to implement the basic ray-tracing algorithm for a scene containing a single sphere hovering over a checkerboard ground square.

  What stage of the sdlc is acmes order entry system in

acme inc. is an international manufacturer that recently installed a new order entry software system. the system has

  Describe an optimal huffman code

Suppose that 2n letters each have the same frequency k . Describe an optimal Huffman code, justifying your answer with Huffman's algorithm.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd