What is the best way to go about writing instructions for a robot to play a human in norts and crosses?
-
I have to write instructions for a robot arm to play a human at norts and crosses - the only way I can think of at the moment would be to write down every possible combination or ...show more
-
Answer:
Store the results in an array you can rotate and flip according to your needs, and have it iterate through the following hierarchy on every move: 1. If 2 of my pieces exist in a row, place a third piece to win. 2. If 2 of my opponent's pieces exist in a row, place a third piece to block winning. 3. If 2 of my pieces exist in a row, place a piece such that it is adjacent to both, creating a fork. 4. If 2 of my opponent's pieces exist in a row, place a piece such that I now have two in a row. 5. Place a piece in the center. 6. Place a piece in a corner opposite my opponents' piece. 7. Place a piece in any empty corner. 8. Place a piece in the center of any empty edge. Tic Tac Toe is a solved game; this should get the computer a fairly competent win/loss record.
AJYXDZSWBC3BCHRVJ4MCWNMIFQ at Yahoo! Answers Visit the source
Related Q & A:
- What is the best way to go to the TX Motor Speedway?Best solution by Yahoo! Answers
- What's the best way to make a good impression at a job interview?Best solution by Yahoo! Answers
- What are the best way to go to the Bollywood?Best solution by wikihow.com
- What is the best way to get rid of nerves before a test?Best solution by Yahoo! Answers
- What is the Best way to request for part time as a current full time employee?Best solution by everydaylife.globalpost.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.