$30
CSCI-561 – Foundations of Artificial Intelligence
Homework 1a
Purpose of this assignment
The aim of this assignment is to introduce you to Vocareum so that you can practice
with the system named Vocareum that will be used for all assignments. Homework 1b
will be released after the due date of 1a.
Useful resource
A good tutorial for Python https://www.w3schools.com/python/
A useful tutorial for Vocareum
https://help.vocareum.com/article/30-getting-started-students
Problem Description
In this exercise, you need to implement a simple reflex agent based on what you
learned. After that you need to upload your python file to the Vocareum to be graded.
The behavior of a simple reflex agent is as follows:
An illustrative Example
Sample input file (the input file should be named as “input.txt”):
Format: Lines of comma separate value tuples <Location, Status.
Sample Output File:
Your python script must call the output file “output.txt”.
Grading
Your homework submission will be tested as follows:
python hw1acs561f18.py
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. The formats
for files “input.txt” and “output.txt” are specified below. End-of-line convention is
Unix (because Vocareum is a Unix system).
Note that if your code does not compile, or somehow fails to load and parse input.txt,
or writes an incorrectly formatted output.txt, or no output.txt at all, or OuTpUt.TxT,
you will get zero points.
Sample Test Cases
You are provided with 1 sample test case and output. Please find them in the
Homework 1 folder.
Homework Rules
1. You must 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. You need to create a file named “hw1acs561f18.py”. When you submit the
homework on labs.vocareum.com, the following commands will be executed: python
hw1acs561f18.py
3. Your code must create a file named “output.txt” and print its output there.
4. Homework should be submitted through Vocareum. Homework submitted through
email, in person during office hours, or through any channel other than Vocareum will
not be accepted. Please only upload your code to the “/work” directory. Don’t create
any subfolder or upload any other files. Please refer to
http://help.vocareum.com/article/30-getting-started-students to get started with
Vocareum.
5. Your program should handle all test cases within a reasonable time. A maximum
runtime of 3 minutes per test case will be set on Vocareum.
6. You are strongly recommended to submit at least two hours ahead of the deadline,
as the submission system around the deadline might be slow and possibly cause late
submission. Late submissions will not be graded.