100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
5-2 Final Project Milestone Three Proposed Changes Southern New Hampshire University IT 450 $8.99   Add to cart

Exam (elaborations)

5-2 Final Project Milestone Three Proposed Changes Southern New Hampshire University IT 450

 66 views  1 purchase
  • Course
  • Institution

Final Project Milestone Three: Proposed Changes In order to understand the AI in the Checkers game, we must look at how the AI is handled when the computer makes its turn. The game uses several functions that handle what move should be done given the exact situation where the game is at the time...

[Show more]

Preview 1 out of 4  pages

  • March 31, 2023
  • 4
  • 2022/2023
  • Exam (elaborations)
  • Questions & answers
avatar-seller
Glenn Savarese 7/29/2021

IT-450 Final Project Milestone Three: Proposed Changes

In order to understand the AI in the Checkers game, we must look at how the AI is

handled when the computer makes its turn. The game uses several functions that handle what

move should be done given the exact situation where the game is at the time (more on this later).

The game uses the “movesAvailable” (see figure 1) function to generate what moves are

possible at the time and stores them in an array called “moves”. The list of moves made is simply

called “move” and is used as the basis for this array. During this process, which is called every

computer turn, the game calls another function called “moveIsValid” (see figure 2) to handle

whether the available move chosen is able to be made based on the rules of the game.

In order to effectively “pick” an available move, a function called “removeBadMoves”

(see figure 3) is implemented which appends the “moves” array with results of a “badMoves”

array which is populated with moves made throughout the game. The game determines what a

“bad” move is based on certain conditions, such as “did I gain a piece in the second turn after I

lost a piece in the last turn?” and other parameters such as this and constantly updates the

“moves” array with these decisions. This process also narrows down the available moves that

the computer has to choose between, and the move that is chosen is handled by some for loops

(see figure 4 and 5) that prioritize moves based on certain conditions.

In practice however, the AI as it is right now is very simplified as having a high tendency

to preserve itself rather than sacrificing pieces to potentially gain an advantage down the line.

The “hasMorePieces” function (see figure 6) handles this priority and is used in one of the main

for loops.



This study source was downloaded by 100000850872992 from CourseHero.com on 03-30-2023 17:37:12 GMT -05:00


https://www.coursehero.com/file/102373364/5-2-Final-Project-Milestone-Three-Proposed-Changesdocx/

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller ExamsConnoisseur. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $8.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75759 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$8.99  1x  sold
  • (0)
  Add to cart