Write a tic-tac-toe game that allows a human player to play

Assignment Help Computer Engineering
Reference no: EM131841040

Assignment

Write a tic-tac-toe game that allows a human player to play against the computer. Your program will play many turns against a human opponent, and it will learn. When it is the computer's turn, the computer randomly selects an empty field, except that it won't ever choose a losing combination. For that purpose, your program must keep an array of losing combinations. Whenever the human wins, the immediately preceding combination is stored as losing. For example, suppose that X = computer and O = human. Suppose the current combination is

1295_tic-tac-toe.jpg

Now it is the human's turn, who will of course choose

2338_tic-tac-toe1.jpg

The computer should then remember the preceding combination

1608_tic-tac-toe2.jpg

as a losing combination. As a result, the computer will never again choose that combination from

1514_tic-tac-toe3.jpg

Or

231_tic-tac-toe4.jpg

Discover classes and supply a UML diagram before you begin to program.

Reference no: EM131841040

Questions Cloud

Write a program that assigns seats on an airplane : Write a program that assigns seats on an airplane. Assume the airplane has 20 seats in first class and 90 seats in economy class.
Represent the hierarchy of information : Are decision trees, navigation maps, and storyboards enough for your design to represent the hierarchy of information or do you require an additional tool
Calculate the utility levels of each portfolio for investor : Calculate the utility levels of each portfolio for an investor with A=2. Assume the utility function is U=E(r)-.05Ao2.
Problem regarding the web development : Create a page with a 10 by 2 table that lists any twenty sports teams, pizza shops, or pet stores that you want to include. the table is to be on a separate pa
Write a tic-tac-toe game that allows a human player to play : Write a tic-tac-toe game that allows a human player to play against the computer. Your program will play many turns against a human opponent, and it will learn.
What is the standard direct labor rate per hour : Vitalite, Inc., produces a number of products, including a body-wrap kit. What is the standard direct labor rate per hour
Why are information systems vulnerable to abuse and error : Why are information systems vulnerable to destruction, error, and abuse? What are the most common threats against information systems?
What are projected advances into the future : Go to tele-immersion's website and explore the nature of the project working to develop tele-immersion technology. Connect to the link marked "Projects".
Reading and understanding of three-point lighting : Why is this technique important and how can it be used to enhance video production. In your explanation posts images which help illustrate examples

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd