Question: help me to complete these tasks using python language here's the starting code # comment line that can be ignored # # File format: #

help me to complete these tasks using python language

help me to complete these tasks using python language here's the starting

code # comment line that can be ignored # # File format:

here's the starting code # comment line that can be ignored # # File format: # # Node label code # Edge label label code # Ncode code weight # Ecode code weight # Start label # Target label # # Node types F=food, D=dog, T=toy, - has no impact/empty Ncode F -1 Ncode D 100 Ncode T 1 Ncode - 0 # Define nodes and labels Node A - Node B T Node C - Node D - Node E - Node F - Node G F Node H D Node I F Node J - # Edge types - is a standard 1 unit per edge Ecode - 1 # Define edges Edge A B - Edge A E - Edge B A - Edge B E - Edge B F - Edge B C - Edge C B - Edge C F - Edge C G - Edge C D - Edge D C - Edge D G - Edge E A - Edge E B - Edge E F - Edge E H - Edge F B - Edge F C - Edge F E - Edge F G - Edge F H - Edge F I - Edge G C - Edge G D - Edge G F - Edge G I - Edge H E - Edge H F - Edge H I - Edge H J - Edge I F - Edge I G - Edge I H - Edge I J - Edge J I - Edge J H - # Define Start and Target(s) Start A Target J

2 The Problem This assignment requires the extension of your graph code to apply it to movement through a "world". The world will be a weighted, directed graph, with nodes for the start position and target(s), and other nodes containing blocks, diversions, boosts and portals. For example, in a cat world, a dog may block you, toys may take your attention, food may give you more energy and portals may prove that cats are pan-dimensional beings. This structure could also be used to implement Snakes and Ladders, or other games. Your task is to build a representation of the world and explore the possible routes through the world and rank them. Sample input files will be available - with various scenarios in a cat world. Your program should be called gameofcatz.py/java, and have three starting options: . No command line arguments : provides usage information "-": interactive testing environment "-s": simulation mode (usage: gameofcatz -s infile savefile) . When the program starts in interactive mode, it should show the following main menu: (1) Load input file (2) Node operations (find, insert, delete, update) (3) Edge operations (find, add, remove, update) (4) Parameter tweaks (adjust mapping of codes to penalty/boost features, see sample input file) (5) Display graph (weighted adjacency matrix, option to save) (6) Display world (your choice of representation, does not need to be graphical, should include counts of features, eg. 2 dogs and 3 toys, etc. Provide an option to save this data to a file) (7) Generate all possible paths through the world and calculate the weight of each path (8) Display paths (in order of weight with an option to save this data to a file) (9) Save network You can structure the menu/UI differently, just make sure at least those feature options are included. When running in simulation mode, you will give the input files on the command line, then output the ranked paths to a file. Once you have a working program, you will showcase your program, and reflect on its performance. This investigation will be written up as The Report

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!