7-2 Final Project Submission AI Solution Proposal

docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

450

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

11

Uploaded by yasiny714

Report
1 7-2 Final Project Submission: AI Solution Proposal YasinYusuf Southern New Hampshire University IT-450-X2341 Artificial Intelligence Joshua Montgomery 12/15/2023
2 Introduction Checkers is a well-known and popular board game in which two players strive to claim all of the opposing player's pieces. When humans compete against one another, it could lead to an unpredictable game where players try to utilize rational thought in order to take the most profitable and effective course of action. Due to the fact that each player has various options to weigh in future turns, the games can get rather complicated. But since not everyone has played checkers before, some players may find a human versus human game to be disadvantageous if the new player doesn't have the experience necessary to outsmart their opponent's strategy. My Proposal is to make the AI make more informed decisions and to make the UI more beginner friendly. Analysis Screenshot One: What is going on here: The function "validTileSelect" is defined in this screenshot, with the given parameters s, X, and Y used to identify where the player clicks on the game board. The function checks to see if the tile that was clicked on is valid and able to be selected. If the tile is allowed, the game will let you to perform operations such as moving pieces, capturing pieces, and creating kings. You cannot select an invalid tile.
3 [Proposed change: It would be useful to highlight or slightly vary the color of tiles that can be chosen. This would simplify the game for people new to it who may not have a lot of knowledge about playing checkers. I would briefly shift the color value of the valid tiles and then return to the original red values once the move is finished.] Screenshot Two: What is happening here: The function "StandardSetup" is defined in this screenshot. This function draws a standard checkers board and places the pieces to correspond to a typical checkers game. [Proposed change: The button that initiates this function is difficult to distinguish from the other buttons in the game's user interface. I'd modify the color to make it more visible and add a thicker border to visually highlight that you can hit this button to start a game rather than manually setting it up.] Screenshot Three:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
4 What is going on here: In this screenshot, the function "validTileMove" is defined, with parameters s, X, and Y used to determine where the player clicks on the board. Using true or false values, this function determines whether the tile selected by the player when they click one is correct. If true, the player can choose the tile and continue playing; if false, they cannot. [Proposed change: The proposed modification applies to both "validTileSelect" and "validTileMove" because they operate together to enable fundamental game functionality. I propose changing the color value of the tiles that can be selected and moved to "highlighted" tiles.] Screenshot Four: What is happening here: The function "moveIsValid" is defined in this screenshot, with the parameters of s, x, y, X, and Y being utilized to establish the initial and ending X and Y values that hold where the user clicks in the available area. The function "moveIsValid" operates in combination with "validTileSelect" and "validTileMove" to assess whether a piece on the board can be properly moved. It handles the game mechanics in this area by employing "PieceCanJump" and "CanDoWalk" [Proposed change: I propose that when a player chooses an invalid move, a limit is set so that after the player makes 5 invalid move , it triggers a dialogue box that prompts the player to select a "highlighted" piece instead.] Screenshot Five:
5 What is happening here : The function "PieceCanJumpTo" is shown in this screenshot using the parameters s, x, y, X, and Y, which determine the initial and ending positions of the regions the player clicks on the game board. This function determines whether a piece on the board can move and/or overtake (capture) another piece using a mathematical method of tile positions and saves the results to variables called X1, X2, Y1, and Y2. The function then calls "PieceCanCapturePiece" via a loop and uses the values of these four variables to successfully determine whether the piece has captured the rival player's/computer's piece. [Proposed change: Continuing with the previous modifications, I'd indicate the tiles wherein the player can jump to make the selection more evident.] Application For my simpler improvement, I decided to make the "Standard Board" button more visible, so players could readily discover it to set up the board. Originally, the button was white and simply said "Standard Setup." It took me a while to find this button the first time I played the game, and I assumed I'd have to position all the pieces personally. My modifications were basic but practical. I started by changing the text to "Original Layout" and the button color to teal. I chose this hue to stand out because it was different from the other colors on the board. Before:
6 After: Originally the change I wanted to make was that when a player chooses an invalid move, a limit is set so that after the player makes 5 invalid moves, it triggers a dialogue box that prompts the player to select a "highlighted" piece instead. Instead, I chose that if the player selects an invalid tile more than 5 times, a popup window appears with a hint to move to a diagonal tile. I believe this is an appropriate move, however I hope to find a way to include the highlights at some point. This suggestion will also assist players comprehend that whether the piece is a pawn or a king, they can only move diagonally.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
7 Before:
8 After:
9 AI Solution After weeks of playing against the AI, in my opinion it is to simple to defeat after experiencing the logic behind its moves. Using Minimax(with Alpha-Beta pruning) search tree is one way to potentially solve this issue. which, according to what I understand is the search tree component of the minimax method. It will make the AI more challenging because it will be able to find more tricky moves during the game. Alpha-beta pruning's fundamental principle is that a move is dropped once it is determined to be ineffective, and no further resources are used to determine just how ineffective it actually is. This is comparable to branch and bound search, where partially explored pathways are dropped when they are determined to be less than ideal. As things stand, the AI is programmed to read off a list of movements and doesn't actually see moves ahead of time; instead, it plays only when the situation calls for it. As opposed to simply going through a list and making moves based on who has more pieces, this more sophisticated approach would consider each action and base the next move accordingly. In order for the AI to plan and prepare to attack or counter, it can be helpful to have the AI value each position and move made by the opponent. This way, the AI can learn more about what the opponent will do next. The minimax method's implementation is significantly more sophisticated than the current heuristic approach.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
10 Conclusion I think that the strategy I used to identify the optimal AI problem solution was a successful one that accomplished my goals. We made multiple changes to the code to reorder the AI's priorities and enable it to make more intelligent gaming judgments. We also added and removed small portions of the AI's procedures. This method may be used for other comparable issues, such as the majority of other one-on-one card games or even some straightforward board games. This kind of AI makes decisions based on what's truly the best course of action rather than at random.
11 References Lucci, Stephen, and Danny Kopec. Artificial Intelligence in the 21st Century [OP] , Mercury Learning & Information, 2015. ProQuest Ebook Central , http://ebookcentral.proquest.com/lib/snhu-ebooks/detail.action?docID=4895065.