English Amiga Board Idea and help for tic tac toe AI
 Register Amiga FAQ Rules & Help Members List  /  Moderators List Today's Posts Mark Forums Read

 06 May 2019, 04:08 #1 xboxown Registered User   Join Date: Dec 2012 Location: Vancouver/Canada Posts: 470 Idea and help for tic tac toe AI AI Method A) Check to see which spaces are empty B) Check to see which spaces filled belong to the opposing enemy C) Check to see which spaces filled belong to AI itself D) Calculate the opposing enemy how many lines formed in adjacent motion that could result in winning. It checks the vertical, it checks the horizontal and it checks the adjacent. E) If the enemy can win regardless of which of those you blocked because it can win the other lines formed in the board then it checks to see if it should use the move to win first. If the AI have no winning move..it will randomly pick any of the types formed and block it. F) If there are only one formed line whether it is horizontal, vertical, or adjacent as a winning move then it blocks that line and uses it's turn to prevent the enemy from winning. G) If there are only 3 lines formed from the opposing enemy then it rolls a dice and it decide 50/50 if it should bother block it or do a different move. H) If it does not block that player then it checks the space filled for the AI and see which is line that is formed either horizontal, vertical or adjacent that could trigger a winning move and place the piece to win the game. I) It rolls a dice and there are 50% chance of randomly placing in the available space or 50% chance it checks and see if the horizontal or vertical or ascending row total to five (that belongs to you or is empty), if it total five and there are more than one possibility then it calculate the row indexes into an array and store total count of number of rows that are adjacent to each other and it is more than one. Then it randomly pick the index array that store the row and column information and based on that it adds the piece either to the right/left/up/down or adjacent to the row/column/adjacent. Guys this is the AI I am working for my game. What do you guys think? Does anyone have any awesome brainstorming for improving the AI more and more for my game? Did I miss anything else? Thanks in advance.
 06 May 2019, 09:59 #2 Daedalus Registered User   Join Date: Jun 2009 Location: Dublin, then Glasgow Posts: 4,010 That sounds reasonable, but for AI in games like this, I prefer to use the "look ahead" method: make a copy of the board and do a look ahead calculation to see what the board might look like in a number of moves, starting from the first empty space. Then, from that board, calculate a score for how well that move has worked. It can then repeat the process for each possible move, and the empty space with the highest score at the end is the one to go for. By adding extra scoring criteria and look ahead moves, you can adjust the difficulty.

 Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 Similar Threads Thread Thread Starter Forum Replies Last Post astraldimension Retrogaming General Discussion 0 13 March 2015 12:55 parabola Looking for a game name ? 1 04 May 2014 08:35 Shoonay request.Old Rare Games 1 25 September 2011 22:37 Vars191 MarketPlace 4 02 June 2008 13:56 mtb support.Hardware 3 21 November 2003 12:46

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home News Main     Amiga scene     Retrogaming General Discussion     Nostalgia & memories Support     New to Emulation or Amiga scene         Member Introductions     support.WinUAE     support.WinFellow     support.OtherUAE     support.FS-UAE         project.AmigaLive     support.Hardware         Hardware mods         Hardware pics     support.Games     support.Demos     support.Apps     support.Amiga Forever     support.Amix     support.Other Requests     request.UAE Wishlist     request.Old Rare Games     request.Demos     request.Apps     request.Modules     request.Music     request.Other     Looking for a game name ?     Games images which need to be WHDified abime.net - Hall Of Light     HOL news     HOL suggestions and feedback     HOL data problems     HOL contributions abime.net - Amiga Magazine Rack     AMR news     AMR suggestions and feedback     AMR data problems     AMR contributions abime.net - Home Projects     project.Amiga Lore     project.EAB     project.IRC     project.Mods Jukebox     project.Wiki abime.net - Hosted Projects     project.aGTW     project.APoV     project.ClassicWB     project.Jambo!     project.Green Amiga Alien GUIDES     project.Maptapper     project.Sprites     project.WinUAE - Kaillera Other Projects     project.Amiga Demo DVD     project.Amiga Game Factory     project.CARE     project.EAB File Server     project.CD32 Conversion     project.Game Cover Art         GCA.Feedback and Suggestions         GCA.Work in Progress         GCA.Cover Requests         GCA.Usefull Programs         GCA.Helpdesk     project.KGLoad     project.MAGE     project.Missing Full Shareware Games     project.SPS (was CAPS)     project.TOSEC (amiga only)     project.WHDLoad         project.Killergorilla's WHD packs Misc     Amiga websites reviews     MarketPlace         Swapshop     Kinky Amiga Stuff     Collections     EAB's competition Coders     Coders. General         Coders. Releases         Coders. Tutorials     Coders. Asm / Hardware     Coders. System         Coders. Scripting         Coders. Nextgen     Coders. Language         Coders. C/C++         Coders. AMOS         Coders. Blitz Basic     Coders. Contest         Coders. Entries Off Topic     OT - General     OT - Entertainment     OT - Sports     OT - Technical     OT - Gaming

All times are GMT +2. The time now is 09:47.

 -- EAB3 skin ---- EAB2 skin ---- Mobile skin Archive - Top