$30
In this assignment, there are three python files that implement the MINIMAX algorithm:
as3_tree.py: this class transforms a list of data into a tree. Do not change this file.
as3_mnx.py: you will work on this file and submit this file only.
as3_test.py: you can use this file to test your implementation. In this file, we included a list of data that provides the terminal value for the tree.
Tasks: two tasks need to be fulfilled:
There are four (4) logical errors, which are intentionally put inside the file: as3_mnx.py. You have to find ALL the errors and fix them. Otherwise, your code will not work correctly. For example, the result of the best terminal value in the root should be '3' instead of '6'. (2 points)
Implement the additional code (also in the file: as3_mnx.py) to return the traversed_solution in the form of an array. For example: ['A', 'X', 'Y'], with A is the root node, X is the child of A, Y is the leaf node containing the best terminal value (which is 3). Apparently, Y the child of X. (3 points)
Remember to put the best terminal value and the traversed_solution into the object res, which is an instance of the class Result. We have already included an example of how to use this object in the file: as3_mnx.py (from line 33 to line 39).