Search for question
Question

Objective ◆ Switch To Light Mode This lab is meant to get you to understand the structure and workings of Markov Decision Processes (MDPs) by experimenting with an MDP simulator, files defining simple MDPs Recipe Ingredients Here are the code files to begin the lab: A. main.py B. testsLab1.py C. MDP.py D. AgentBase.py E. RandomAgent.py Arrange the Agent Base and RandomAgent in a folder called "agent" and the other 3 files at the top level directory for your code project. You will also need some data files, to be placed in a folder called "data": "data": MDP1.txt MDP2.txt MDP3.txt Before you begin You may want to look at the slides from the lab, particularly if you were not in class for this lab (I might also suggest looking at the recording in this case too). Your teaching team is here to help, so please raise your hand if you have any questions or find any problems. Please be sure to get help from the teaching team if constructing and configuring a build system is not something you are familiar with doing. Similarly, if you are not used to object- oriented programming and the code review before starting was not enough Your Task 1. Get everything loaded into an IDE of your choice (e.g., pyCharm). starting was not enough Your Task 1. Get everything loaded into an IDE of your choice (e.g., pyCharm). 2. Run the main, this will load and print MDP1, which is the one we looked at in class. Inspect it and ask any questions about the structure the data takes. 3. Adjust the main so that it also runs the second test, which will print MDP2. 4. (TURN THIS IN) Draw a multi-graph embedding for MDP2, with a charting package or your pencil (phone scan is probably the easiest way to convert pencil drawings to something you can turn in) 5. (TURN THIS IN) Having drawn the graph, describe a policy that you think would perform well in this domain. You may use whatever format seems natural: words, a table like the blackjack example from class (in which a state maps to an action, so in this case a 1-D table), or something different. 6. Uncomment the rest of the tests, and run them. Use the output and source code to familiarize yourself with all parts of the program, particularly MDP.py. which a state maps to an action, so in this case a 1-D table), or something different. 6. Uncomment the rest of the tests, and run them. Use the output and source code to familiarize yourself with all parts of the program, particularly MDP.py. 7. (TURN THIS IN) Having seen the Sales MDP in lecture, and now the Dungeon and Parking MDPs, devise an MDP to model a phenomenon of your choosing. It should include a similar "gadget" arrangement as we see moving from a simple entity to a more complex one (e.g., 1 parking space to a parking lot). Submit A file that is readable (pdf, docx, etc) containing your drawing for part 4, your policy for part 5, and your modeling answer. If you finish early? Prepare for future labs by investigating two files we will work with later Parking LotFactory.py and Parking Lot Defs.py and familiarize yourself with the way they function (these files will live at the top