Skip to main content

Clever Computers: Playing Tic-Tac-Toe

  • Chapter
The Game Maker’s Apprentice

Abstract

In this chapter we are going to create a version of the game tic-tac-toe in which you are pitted against an intelligent computer opponent. This opponent must have a strategy that will regularly beat the player to keep it challenging, but the computer opponent must not be too strong; otherwise the player has no chance of winning, and will quickly become frustrated and give up. We will also show how the computer can adapt its play to the level of the player. The game will be almost completely written using the GML programming language, so make sure you read and understood Chapter 12 on GML before starting this chapter.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Jacob Habgood and Mark Overmars

About this chapter

Cite this chapter

Habgood, J., Overmars, M. (2006). Clever Computers: Playing Tic-Tac-Toe. In: The Game Maker’s Apprentice. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-0159-5_13

Download citation

Publish with us

Policies and ethics