Searching and Python
This assignment will give you practice with posing AI problems as search and an opportunity to dust off your coding skills. Because it’s important for everyone to get up-to-speed on Python, for this particular assignment you must work individually. Future assignments will allow you to work in groups. Please read the instructions below carefully; we cannot accept any submissions that do not follow the instructions given here. Most importantly: please start early, and ask questions on Piazza or in-office hours.
If you don’t know Python, never fear – this is your chance to learn! But you’ll have to spend some significant amount of out of class time to do it. Students in past years have recommended the Python CodeAcademy website, http://www.codeacademy.com/learn/python, and Google’s Python Class, https://developers. google.com/edu/python/. There are also a wide variety of tutorials available online. If you’re already proficient in one particular language, you might look for tutorials with names like “How to code in Python: A guide for C# programmers,” “Python for Java programmers,” etc. Feel free to share any particularly good or bad resources on Slack and/or Piazza. The instructors are also happy to help during office hours. If you are struggling, please come and get help! We can’t help if you don’t ask.
Guidelines for this and future assignments
Coding requirements. For fairness and efficiency, we use a semi-automatic program to grade your submis- sions. This means you must write your code carefully so that our program can run your code and understand its output properly. In particular:
You must code this assignment in Python 3, not Python Please be forewarned that Python 2 is still quite popular, despite being obsolete, so many examples and tutorials you see online may be written in Python 2. There are many minor changes between the two versions (see https:
//docs.python.org/3/whatsnew/3.0.html), but two come up particularly often. First, in Python 3, print is a function, so its arguments must be surrounded by parentheses. Second, in Python 3, dividing one integer by another integer performs floating point division, instead of integer division.
Make sure to include a #! line at the top of your code to specify which version of Python to This so-called “hash-bang” or “sh-bang” line should look like this:
You should test your code on one of the SICE Linux systems such as burrow.sice.indiana.edu. We will test your code on this system, so this is the only way to guarantee that your program will work correctly when we run it. You may (and probably should!) do your actual day-to-day development work on your laptop, but it is important that you periodically check that your code operates correctly on our servers, as minor differences in Python versions, available modules, etc. may cause your code to work differently — and may seriously affect your
Your code must obey the input and output speciftcations given below. Because our grading program is automatic (and is not powered by advanced AI!), it will not understand your code’s input and output unless you carefully follow the specifications given below. For example, your code should not require keyboard input (i.e., someone actually typing keys once your program is running) unless we specifically indicate it below. We usually will say that the last few lines of output from your program must be in a certain format; your code can output extra lines before that (e.g., for debugging purposes) because our grading program will look at just the last lines of
You may import standard Python modules for routines not related to AI, such as basic sorting algorithms and data structures like queues, as long as they are already installed on the SICE Linux However, using additional modules is typically not required; we’ll usually tell you if we feel a module would be helpful.
Make sure to use the program ftle name we For example, for part 1, please call your program submission find luddy.py, as we specify below. Submitting your program with a different name, or submitting multiple versions of your code, is just a recipe for confusing the graders.
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of