Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[JAVA] [Binary Tree/Recursion] [Will rate highly] I need help implementing a binary tree for a program I'm making that uses artificial intelligence in which the

[JAVA] [Binary Tree/Recursion] [Will rate highly]

I need help implementing a binary tree for a program I'm making that uses artificial intelligence in which the computer can never lose to the player in a game of Tic Tac Toe. Here's a sample of what the output would look like:

image text in transcribed

Here's the class i need help writing?

image text in transcribed

Can anyone show me how to write this class? Thanks.

run 1 Welcome to Tic Tac Toe This is the board: 11213 4 56 71819 Please make a move the probability of a win is:e.41 the probability of a draw is:0.20 the probability of a loss is:e.37 Please nake a move XIXIo the probability of a win is:e.23 the probability of a draw is:e.25 the probability of a loss is:e.51 Please nake a move XIXIo XIO the probability of a win is:0.0 the probability of a draw is:0.0 the probability of a loss is:1.0 The winner is:o Welcome to Tic Tac Toe This is the board 1 2 3 71819 Pleas make a move the probability of win is: 2.41 the probability of is 0.20 the probability of a loss is: .37 Please make a move XlolX the probab y of a win is:e.26 the probab lity of a draw is:e.39 the probability of a loss is:e.34 pleas make a XIOIX Xlo the probability of a win is:e.33 lity of a draw is:e.66 the probab the probability of a loss is:0.0 Please make a move XlolX 010 XIXlo the probability of a win is:0.0 the probab y of a draw is:1.0 the probability of a loss is:e.e Please make a move XlolX 0 0 X Ixlxlol the probability of a win is:0.0 the probability of a draw is:1.0 the probability of a loss is:0.0 It's a draw run 1 Welcome to Tic Tac Toe This is the board: 11213 4 56 71819 Please make a move the probability of a win is:e.41 the probability of a draw is:0.20 the probability of a loss is:e.37 Please nake a move XIXIo the probability of a win is:e.23 the probability of a draw is:e.25 the probability of a loss is:e.51 Please nake a move XIXIo XIO the probability of a win is:0.0 the probability of a draw is:0.0 the probability of a loss is:1.0 The winner is:o Welcome to Tic Tac Toe This is the board 1 2 3 71819 Pleas make a move the probability of win is: 2.41 the probability of is 0.20 the probability of a loss is: .37 Please make a move XlolX the probab y of a win is:e.26 the probab lity of a draw is:e.39 the probability of a loss is:e.34 pleas make a XIOIX Xlo the probability of a win is:e.33 lity of a draw is:e.66 the probab the probability of a loss is:0.0 Please make a move XlolX 010 XIXlo the probability of a win is:0.0 the probab y of a draw is:1.0 the probability of a loss is:e.e Please make a move XlolX 0 0 X Ixlxlol the probability of a win is:0.0 the probability of a draw is:1.0 the probability of a loss is:0.0 It's a draw

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

Students also viewed these Databases questions

Question

What tools might be helpful?

Answered: 1 week ago