ITI 1121: Introduction to Computing II - Machine Learning - IT Assignment Help

Download Solution Order New Solution
Assignment Task:

Learning objectives

  • Inheritance, Composition and Abstract Classes

  • Introduction to Machine Learning

Introduction

We have created the basis for our implementation of MENACE, an automated system learning how to play Tic-Tac- Toe. In this assignment, we will use the solution of assignment 3, you must thus complete it first. We will use our previous work to create our own implementation of Donald Michie’s 1961 paper.

Menace

We are now ready to implement Menace. If you have not already done so, you should really read the paper published by Donald Michie in 1961 in Science Survey, titled Trial and error.

In the following, we are only going to deal with 3x3 games, because that is what was defined in the paper. You do not have to worry about other board sizes, only 3x3.

We have given you everything that is required for this part, so you only need to focus on the implementation of ComputerMenacePlayer and MenaceGame. However, you need to use a working solution of assignment 3.

In our solution, we have our MENACE player, playing against a range of possible players: a human, a random player, a prefect player, or another MENACE player.

The human player and the random player were already implemented in the previous assignments. We do provide an implementation of a perfect player. You do not need to understand how it works precisely (but of course, you can!) but you should definitely have a look at the code since this will help you a lot for the implementation of MENACE.

We have done a couple of changes in the design:

First, we now would like our Players to share some additional methods. It used to be that all a Player had to do was to give a concrete implementation of the method play.

Now, we want to be able to inform the Player that a new game is starting and that a game is finished. We want the player to keep some stats about its performance: how often it won and lost overall, as well as over the last 50 games (to track progress). The implementation of some of these methods are common to all Players, so we would like to add the code directly in Player.

However, Player was an interface which prevented us to do this. So we transformed it in a full fledged class. We still cannot provide a default implementation for the method play, so that method is still abstract, therefore Player is now an abstract class. We have provided the implementation for all the other methods of the class Player.

Second, some of our players will need to augment a TicTacToe with additional details. For example, our perfect player needs to record which of the possible moves are winning and which ones are losing. We created a new class PerfectGame that will be composed of a TicTacToe game, but also tracks the outcome of each move (win/lose/draw) and how many moves until that outcome. The PerfectGame is used by ComputerPerfectPlayer to be the perfect player.

The way the class works is that when an instance of ComputerPerfectPlayer is created, it first creates the list of all possible games, as we did in Assignment 3. The player then unravels all wins, all losses and all draws into PerfectGames so that it can determine which ones should be played, and which ones should be avoided.

It is then ready to play games. When its method play is called, it receives an instance of TicTacToe and looks through the precomputed games to find which one corresponds to the current state of the game (up to symmetry) and then selects from there one of the best possible moves, as precomputed during initialization. ComputerMenacePlayer will work very much in the same way.

The gist of MENACE is that it precomputes all possible games (up to symmetry), and for each game, it initially provides a certain number of beads for each possible move. When playing a game, MENACE finds the game corresponding to the current state and randomly selects one of the beads it has for that game. The more a given move has beads at that stage, the more likely it is to be selected. Once the game is finished, MENACE will update the number of beads for each of the moves used during that game, based on the outcome: if the game was lost, then the beads that were selected will be removed, making it less likely that similar moves will be selected in the future.

 

This ITI 1121: IT Assignment has been solved by our IT Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.