matlab代写

Project II – Tic-Tac-Toe Madness
Professor Edgar Caraballo, GAR 56B, e-mail: carabaej@miamioh.edu, Phone: 529-0716

Tic-Tac-Toe Competition

You are responsible for creating an algorithm (i.e. MATLAB® function) that will be pitted against your classmates in a bracketed winner-take-all tournament. The code that will call your function and play it against your classmates is given in the attachment tictactoe.m

Code Formatting

In order for the code to work several stipulations must be met:
1.) Your function will be called by the program tictactoe.m. This function’s name must be your unique ID.
2.) If you use multiple functions, all functions must be turned in with the code so it can be run.
3.) Your function must accept two inputs, a 3 by 3 matrix (the board) and a 1 or -1 (depending if you are user 1 or user 2.
4.) Your function must have one output which will be a 3 by 3 matrix (the board).

Rules

1.) Each round, your algorithm will be played against a classmate’s algorithm 1000 times. The total wins, losses, and ties will be counted. The user with the most wins will move onto the next round.
2.) In the event of a tie, the same classmates will have their algorithms ran 1000 more times, the player with the best record moves onto the next round. If the users tie again, a coin will be flipped to see who advances to the next round. Both users will be awarded bonus points.

3.) The bracket match-ups will be randomly selected and posted on Monday December 1st on Canvas.

Deliverables

Code runs without faults (no errors and, no forfeits) and algorithm complexity – 35 points Correctly documented/commented code and flow-charts – 65 points

Bonus

o Flowchartfortictactoe.m–10points o Flowchartforwinner.m–10points
o Flowchartforlegalmove.m–10points o Flowchartforyourcode–20points

o Code is well commented – 15 points

1st round – 1 point 2nd round – 2 points 3rd round – 3 points 4th round – 6 points 5thround – 9 points

The tournament will be held in the classroom on December 7th. Due Date: Friday, December 6th by 11:59 p.m. to Canvas

**When you turn it in, do not zip the files into one folder. Turn them in as individual files, otherwise they will not run in the MATLAB code when called and you will lose 35 points.**