Artificial intelligence engine to play tic tac toe (written in C)

Completed Posted Feb 23, 2008 Paid on delivery
Completed Paid on delivery

I need an ANSI C implementation of an artificial intelligence engine which plays tic tac toe. For those of you not familiar with the rules of the game, you have a 3x3 board and you have to try and get three pieces in a row (either vertically, horizontally or diagonally). I will have a 2d array which holds the gameboard content. 1 is a white piece, 2 is a black one and 0 is an empty square. I need an AI engine which:

1. Decides what move to make in a similar way as a human being would.

2. Allows you to set a difficulty level (between 1 and 3), to choose how good the computer player should be.

I need a function that I can call to figure out what move the computer should make. I'll pass a pointer to the 2d array that contains the gameboard, which player the computer is controlling (1 or 2), the difficulty level and two out variables which it will fill with the moves that it decides to make (from square x to square y). So you do not need to modify the array inside the actual function (just fill the two out variables with the move that is calculated).

The computer should think ahead and not just make a move based on the current game state, it needs to calculate possible outcomes a few moves ahead and then decide what to do. This should also depend on the difficulty level, and there should be a small amount of randomization as well (I will provide a random function for you to use which is better than rand).

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Deliverables must be in ready-to-run condition, as follows? (depending on the nature? of the deliverables):

a)? For web sites or? other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.

b) For all others including desktop software or software the buyer intends to distribute: A software? installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.

3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform

ANSI C (use the standard C library)

C Programming Engineering Game Consoles Game Design MySQL Odd Jobs PHP Software Architecture Software Testing

Project ID: #3746173

About the project

22 proposals Remote project Active Feb 24, 2008

Awarded to:

anubhawps

See private message.

$63.75 USD in 5 days
(23 Reviews)
4.0

22 freelancers are bidding on average $79 for this job

MuktoSoftware

See private message.

$76.5 USD in 5 days
(492 Reviews)
7.5
xmartin

See private message.

$85 USD in 5 days
(67 Reviews)
6.0
clanmckennavw

See private message.

$63.75 USD in 5 days
(90 Reviews)
5.4
cloe

See private message.

$34 USD in 5 days
(24 Reviews)
5.1
vw1472593vw

See private message.

$68 USD in 5 days
(28 Reviews)
4.9
oooshofdds

See private message.

$255 USD in 5 days
(13 Reviews)
4.8
24bits

See private message.

$42.5 USD in 5 days
(46 Reviews)
4.6
systemcoders

See private message.

$85 USD in 5 days
(12 Reviews)
4.0
ispy1785

See private message.

$59.5 USD in 5 days
(10 Reviews)
3.9
nabilshams

See private message.

$212.5 USD in 5 days
(7 Reviews)
3.6
Pepito666

See private message.

$63.75 USD in 5 days
(1 Review)
3.3
cypsl

See private message.

$34 USD in 5 days
(25 Reviews)
3.2
saifuddinme

See private message.

$42.5 USD in 5 days
(12 Reviews)
3.0
infodatavw

See private message.

$42.5 USD in 5 days
(8 Reviews)
1.6
harqodervw

See private message.

$25.5 USD in 5 days
(1 Review)
0.0
geckolux

See private message.

$12.75 USD in 5 days
(0 Reviews)
1.3
owaisyahyavw

See private message.

$28.05 USD in 5 days
(0 Reviews)
0.0
vladpms

See private message.

$340 USD in 5 days
(0 Reviews)
0.0
mksexcel

See private message.

$17 USD in 5 days
(0 Reviews)
0.0
kareevw

See private message.

$39.95 USD in 5 days
(0 Reviews)
0.0