Project Update (10/16/17)

Here are several comments on the I/O of the main project deliverable (due end of week 10 of Schedule).

Relevant URLs that we have discussed previously are https://my.vanderbilt.edu/cs4260cs5260/project/ which links to
https://my.vanderbilt.edu/cs4260cs5260/ai-project-deliverable-1/ which links to
https://my.vanderbilt.edu/cs4260cs5260/project-update-92117/.

1. The output is a plan: “M) A plan is a conjunction of scheduled courses, with constraints that (a) the sum of the credits in each scheduled term (e.g., (‘Spring’, ‘Soph’)) must not be less than 12 and must not be greater than 18.; and (b) no course can be planned for a term that occurs before the term that a pre-requisite is planned. The function course_scheduler will be returning a plan.https://my.vanderbilt.edu/cs4260cs5260/ai-project-deliverable-1/. See bullet 12 below for what your function course_scheduler (course_descriptions, goal_conditions, initial_state) will return.

2. On Piazza I have answered other questions about Summer terms (e.g., that they are restricted to 0 credits to 6 credits each summer term). You need not include summer terms, and test cases will not require that you use them.

3. One strategy for enforcing the lower bound is to first regression plan to enforce the prerequisite constraints of all courses that are just necessary to enforce the goal conditions (e.g., (“CS”, “mathematics”), (“CS” “core”) …), and then in a second phase go through and add courses so that each term that has at least 1 credit already (from first phase), is made to have at least 12 credits (and no more than 18 credits). Aside: when you are working on the final deliverable (i.e., optionally adding advanced functionality to your planner, which is due in week 14), you might make this second phase “interactive” with a human user, or otherwise add some “intelligence” to it.

4. See the image below for an example plan, represented as a spreadsheet. The spreadsheet itself can be found here. Note that this plan does NOT enforce the lower bound of 12 credits per term, and you would likely lose a couple of percentage points for it.

SamplePlan5. This sample plan was created with goal conditions of {(‘CS’, ‘mathematics’) (‘CS’, ‘core’) (‘MATH’, ’3641’) (‘CS’, ’1151’) (‘MATH’, ‘2410’)} (again, with an incomplete planner). Remember that “goal conditions are given as a conjunction of courses and/or higher level requirements.” https://my.vanderbilt.edu/cs4260cs5260/ai-project-deliverable-1/. When testing your project, goal conditions will be given as a list of tuples. You might write code to translate an Excel spreadsheet giving the goal conditions (e.g., like the image below) to a list of tuples.

GoalConditions6. Note that specific courses can be goal conditions, just as higher level requirements can be. Sometimes these specific courses are truly in addition to the higher level requirements that are given (e.g., (‘CS’, ’1151’) is not implied by higher level requirements of (‘CS’, ‘mathematics’) and (‘CS’, ‘core’)). Sometimes the specific courses can bias the way that higher level requirements are satisfied (e.g., (‘MATH’, ’3641’) biases towards one way to satisfy (‘CS’, ‘mathelective’), and (‘MATH’, ‘2410’) biases towards one of several ways to satisfy (‘CS’, ‘calculus’). Aside: In deliverable 2 (due week 14), you might add an ability to specify negated goal conditions, such as ~(‘MATH’, ‘2600’).

7. “The initial state for the regression planner, an argument to the course_scheduler function, are the courses for which a student already has credit when the planner is executed. Formally, this is a conjunction of courses.” https://my.vanderbilt.edu/cs4260cs5260/ai-project-deliverable-1/ When testing your project, the initial state will be given as a list of tuples — the same format as goal conditions, and you might write code to translate from an Excel spreadsheet, as you might for goal conditions. For example, if (‘CS’, ’1101’) were in the initial state, then SamplePlan would not list (‘CS’, ’1101’).

8. Notice that (Frosh, Fall) has no courses in the sample plan above. So, there is no need to increase (Frosh, Fall) to 12 credits (e.g., in a second phase of the planner) — see the next bullet point for more.

CourseLoadSample9. Your planner is responsible for assigning terms to scheduled courses. This can be done in any way that places a course’s prerequisites in a term before the course itself. For the default grade of 80%, your final plan may have gaps in terms (e.g., there might be no courses assigned to Spring Sophomore year, but courses in terms before or after). Because these are regression planners, I would imagine that many planners that are submitted will tend to put courses in later terms (e.g., Senior), with earlier terms (e.g., Frosh) not used at all if the goal conditions don’t require many semesters. But this “preference” for later terms is not required. If the goal were CS 1101 only, I imagine that many planners that are submitted will put this in  Senior Spring, but it could also be placed in Frosh, Fall — both would be correct so far as the grader is concerned. This isn’t ideal “user interface” of course, but can be improved later. A smart way to assign terms during regression planning might be based on the “length” of the “transitive closure” of a course’s prerequisite chain.

10. Higher level requirements, such as (‘CS’, ‘core’) are 0 credits, and higher level requirements can be assigned in the same terms as their prerequisites. You could, for example, assign all higher level requirements (i.e., with 0 credits) to (‘Spring’, ‘Senior’).

11. A plan can be represented by your program just like the dictionary used to represent the course catalog. For example, you can use the code you were given in the 9/21/17 update to convert Spreadsheet data to a Python 3 dictionary (see https://my.vanderbilt.edu/cs4260cs5260/project-update-92117/). Printing the dictionary with pprint (pretty print) after reading in the sample plan pictured above results in the print out below. Note that the order of the courses does not matter.

12. Your function def course_scheduler (course_descriptions, goal_conditions, initial_state) should return a course dictionary like that created in the code of the 9/21/17 update.

{Course(program=’CS’, designation=’1101′): CourseInfo(credits=’3′, terms=(‘Fall’, ‘Junior’), prereqs=()),
Course(program=’CS’, designation=’1151′): CourseInfo(credits=’3′, terms=(‘Spring’, ‘Soph’), prereqs=()),
Course(program=’CS’, designation=’2201′): CourseInfo(credits=’3′, terms=(‘Spring’, ‘Junior’), prereqs=()),
Course(program=’CS’, designation=’2212′): CourseInfo(credits=’3′, terms=(‘Spring’, ‘Junior’), prereqs=()),
Course(program=’CS’, designation=’2231′): CourseInfo(credits=’3′, terms=(‘Spring’, ‘Junior’), prereqs=()),
Course(program=’CS’, designation=’3250′): CourseInfo(credits=’3′, terms=(‘Fall’, ‘Senior’), prereqs=()),
Course(program=’CS’, designation=’3251′): CourseInfo(credits=’3′, terms=(‘Fall’, ‘Senior’), prereqs=()),
Course(program=’CS’, designation=’3259′): CourseInfo(credits=’3′, terms=(‘Fall’, ‘Senior’), prereqs=()),
Course(program=’CS’, designation=’3270′): CourseInfo(credits=’3′, terms=(‘Spring’, ‘Senior’), prereqs=()),
Course(program=’CS’, designation=’3281′): CourseInfo(credits=’3′, terms=(‘Spring’, ‘Senior’), prereqs=()),
Course(program=’CS’, designation=’calculus’): CourseInfo(credits=’0′, terms=(‘Spring’, ‘Senior’), prereqs=()),
Course(program=’CS’, designation=’core’): CourseInfo(credits=’0′, terms=(‘Spring’, ‘Senior’), prereqs=()),
Course(program=’CS’, designation=’mathelective’): CourseInfo(credits=’0′, terms=(‘Spring’, ‘Senior’), prereqs=()),
Course(program=’CS’, designation=’mathematics’): CourseInfo(credits=’0′, terms=(‘Spring’, ‘Senior’), prereqs=()),
Course(program=’CS’, designation=’statsprobability’): CourseInfo(credits=’0′, terms=(‘Spring’, ‘Senior’), prereqs=()),
Course(program=’EECE’, designation=’2116′): CourseInfo(credits=’3′, terms=(‘Spring’, ‘Senior’), prereqs=()),
Course(program=’EECE’, designation=’2116L’): CourseInfo(credits=’1′, terms=(‘Spring’, ‘Senior’), prereqs=()),
Course(program=’MATH’, designation=’1200′): CourseInfo(credits=’3′, terms=(‘Spring’, ‘Frosh’), prereqs=()),
Course(program=’MATH’, designation=’1201′): CourseInfo(credits=’3′, terms=(‘Fall’, ‘Soph’), prereqs=()),
Course(program=’MATH’, designation=’1301′): CourseInfo(credits=’4′, terms=(‘Spring’, ‘Soph’), prereqs=()),
Course(program=’MATH’, designation=’2300′): CourseInfo(credits=’3′, terms=(‘Fall’, ‘Junior’), prereqs=()),
Course(program=’MATH’, designation=’2410′): CourseInfo(credits=’3′, terms=(‘Spring’, ‘Junior’), prereqs=()),
Course(program=’MATH’, designation=’2810′): CourseInfo(credits=’3′, terms=(‘Spring’, ‘Senior’), prereqs=()),
Course(program=’MATH’, designation=’3640′): CourseInfo(credits=’3′, terms=(‘Fall’, ‘Senior’), prereqs=()),
Course(program=’MATH’, designation=’3641′): CourseInfo(credits=’3′, terms=(‘Spring’, ‘Senior’), prereqs=())}

13. Some niceties that you might add to the week 10 deliverable include (a) adding prerequisites of each course of a plan instead of the empty prereqs list, (b) include the title of the course in a new field that will be ignored by the autograder, (c) sort the courses in the schedule by the term they are offered.

14. In addition to these guidelines, remember that the regression planner should operate depth-first (at least the “first phase” that satisfies prerequisites should do so, if you create a two-phase approach). You will extra points (up to 5%) for a well documented depth-first heuristic search. There are at least two quality values that the auto-grader will compute. Your heuristic will probably be intended to reduce one or both of these values.

  • One quality measure is the total number of credit hours in a plan that your planner creates for a test problem. For example, if the goal conditions are simply (CS, 4260), and your planner scheduled 4260 in (Spring, Senior), (CS 3251) in (Fall, Senior), (CS 3250) in (Spring, Junior), (CS 2201) in (Fall, Junior), and (CS 1101) in (Spring, Soph), and then fills these 5 semesters up to 12 credits, then this is not as good a plan as a 4 semester solution that has (CS 3250) and (CS 3251) in the same semester.
  • The autograder will also compute the total number of semesters required (not including gap semesters with no courses).