CSCI 364: Homework Assignment #2

Communication Search
Due: 11:00 AM on Wednesday, March 1

You can download the assignment instructions by clicking on this link

Instructions for using GitHub for our assignments can be found on the Resources page of the class website, as well as using this link.

Timing in Python

To calculate how long something takes in Python3, we use time.process_time() from the time module. A short example program is:


	import time
	
	startTime = time.process_time()
	print("How long does it take to call a print statement?")
	endTime = time.process_time()
	duration = endTime - startTime
	print("Answer:", duration, "seconds")
								

Hints

To help debug your programs, here are some of the values I found on the networks:

  • Network1:
    • BFS: Path Length = 10 actions, Cost = 4.5913
    • A*: Path Length = 10 actions, Cost = 4.4441
  • Network2:
    • BFS: Path Length = 27 actions, Cost = 4.5
    • A*: Path Length = 28 actions, Cost = 4.2775
  • Network3:
    • BFS: Path Length = 80 actions, Cost = 6.4321
    • A*: Path Length = 88 actions, Cost = 6.0172