GrogHeads Forum

Tabletop Gaming, Models, and Minis => Wargaming => Topic started by: gameleaper on May 08, 2016, 08:14:05 AM

Title: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 08, 2016, 08:14:05 AM
A.I. in any boardgame for solo play can be done like this:

devide each discition into percentages, eg: 40% left, 30% right, 20% retreat, an 10% wait.

then roll 2 10 sided dice, and get a percentage score, if less than 11 wait, if inbetween 10 and 30 retreat(remember all the scores are added ), if between 30 and 60 go right, and above 60 go left.

you can do this with any decsition you like
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: GJK on May 09, 2016, 05:50:58 AM
Something along those lines may be useful to apply to Peter K's "ASL Bot" idea that he's been working on:
https://boardgamegeek.com/article/22575015#22575015
I've been thinking of making a web based app that would do his random card draws for you.  You could even take it a step further Leaper and probably make a little program that would do that.  ;)

Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: Nefaro on May 09, 2016, 11:38:11 AM
So... are you basically saying the 40/30/20/10 percentages are the magic numbers in this?
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 09, 2016, 02:48:11 PM
the idea is to make a few rational plans , then decide on which with dice, this gives the plans well thought out responses that are not random,

any number of percentages can be used , no magic numbers
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: Nefaro on May 09, 2016, 07:04:00 PM
Quote from: gameleaper on May 09, 2016, 02:48:11 PM
the idea is to make a few rational plans , then decide on which with dice, this gives the plans well thought out responses that are not random,

any number of percentages can be used , no magic numbers

Well.. that's not anything most of us haven't thought about in the past.

I just thought you were emphasizing that specific mix of probabilities as the most interesting.
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 09, 2016, 07:10:22 PM
Quote from: Nefaro on May 09, 2016, 07:04:00 PM
Quote from: gameleaper on May 09, 2016, 02:48:11 PM
the idea is to make a few rational plans , then decide on which with dice, this gives the plans well thought out responses that are not random,

any number of percentages can be used , no magic numbers

Well.. that's not anything most of us haven't thought about in the past.

I just thought you were emphasizing that specific mix of probabilities as the most interesting.

GJK is telling of a random card A.I. that is random and is much more complicated than what I'm suggesting, My idea is simple like mythic GM, you piechart all possibilities out of a 100 then roll and do the action on the piechart. I know its simple , that's the goal of it, and I know we have all thought of diecing , but to formulate 5or5 plans prior and then diceing you get a real feeling of a real opponent.
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: bbmike on May 09, 2016, 07:42:39 PM
gameleaper, so you are saying you would change the percentages based on the most likely decision? I would guess there could be several combinations depending on the situation. Maybe even some as simple as 75% retreat/25% attack.
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 09, 2016, 08:35:56 PM
Quote from: bbmike on May 09, 2016, 07:42:39 PM
gameleaper, so you are saying you would change the percentages based on the most likely decision? I would guess there could be several combinations depending on the situation. Maybe even some as simple as 75% retreat/25% attack.

yes you get the idea, each situation is estimated down to a percentage, there can be 100 possibilities, or just two.
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 09, 2016, 09:39:55 PM
each decition in a game is analysed and split into percentages then a set of 10 sided dice are thrown (or a d100 is thrown) and then look at the analysed results that correspond .

this is done for every situation, you cant have a results table, because all results are thought out just before you roll
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: GJK on May 09, 2016, 10:04:22 PM
Quote from: gameleaper on May 09, 2016, 09:39:55 PM
each decition in a game is analysed and split into percentages then a set of 10 sided dice are thrown (or a d100 is thrown) and then look at the analysed results that correspond .

this is done for every situation, you cant have a results table, because all results are thought out just before you roll

Theoretically that would be a great start towards producing an AI however it's inefficient for a boardgame because a solo player isn't going to calculate the mathematical odds on every possible situation that the enemy AI faces in order to roll a set of percentile dice to see which is chosen.  That would work just fine for a computer game (and I'm sure that most/some/all) are based on something very similar where the calculations can be made almost instantly. 

A boardgame designer that is *really* good at making solo games' AI is John Butterfield.  Look up his "D-Day at Omaha Beach/Tarawa" games for examples.  Jon Southard also made some brilliant solo games AI back in the day ("Carrier" is probably my all time favorite) but in each of these there is a heavy reliance upon charts and factors that can really drag the game down until it becomes 2nd nature.  Because of this, I've been working on a web-based app that would do all the die-rolling and charting results in Carrier for you (see www.garykrockover.com/games/carrier).  It's still a WIP but I have a good number of the charts there.

Where I think you could make a niche Leaper is to have "Computer assisted AI" for popular boardgames.  Have an interface where the player checks a few boxes as it relates to specific situations and your program will spit out a number of options in order of priority.  A game like Panzerblitz/Leader would be a great example of a game that could utilize something like that (as an example).
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 09, 2016, 10:17:26 PM
The games you say are great, but if you've played D&D that I know you would have, you play freeform most of the time, and that's what I'm trying to convey over. it dose seem at first a little tedious to do a percentage score for each decision , but my results are only normally 3-4 choices with different importance, mathematical dosnt come into it - its a 100% divided because humans can calculate percentage well, and the secret is ALL possibilities are included, I learned this from chess algorythms.
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 09, 2016, 10:44:38 PM
its not a random result your generating, its a plan! so play would be like a real player, but you wont know how that player will play it, but whatever it plays it would make sense. playing both sides is to predictable, this isn't like having 4 directions and saying 1,2 go left, 3 go forward, 4 go right, 5,6 go backwards - this is a totally different system that looks like that, each decision is planed with objectives , a random dice roll would give a result with no objective

also you can use this system for major decisions only and playout the detailed game mechanics as you will. its meant to be easy
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 10, 2016, 12:56:43 PM
Quote from: GJK on May 09, 2016, 10:04:22 PM
Quote from: gameleaper on May 09, 2016, 09:39:55 PM
each decition in a game is analysed and split into percentages then a set of 10 sided dice are thrown (or a d100 is thrown) and then look at the analysed results that correspond .

this is done for every situation, you cant have a results table, because all results are thought out just before you roll

Theoretically that would be a great start towards producing an AI however it's inefficient for a boardgame because a solo player isn't going to calculate the mathematical odds on every possible situation that the enemy AI faces in order to roll a set of percentile dice to see which is chosen.  That would work just fine for a computer game (and I'm sure that most/some/all) are based on something very similar where the calculations can be made almost instantly. 

A boardgame designer that is *really* good at making solo games' AI is John Butterfield.  Look up his "D-Day at Omaha Beach/Tarawa" games for examples.  Jon Southard also made some brilliant solo games AI back in the day ("Carrier" is probably my all time favorite) but in each of these there is a heavy reliance upon charts and factors that can really drag the game down until it becomes 2nd nature.  Because of this, I've been working on a web-based app that would do all the die-rolling and charting results in Carrier for you (see www.garykrockover.com/games/carrier).  It's still a WIP but I have a good number of the charts there.

Where I think you could make a niche Leaper is to have "Computer assisted AI" for popular boardgames.  Have an interface where the player checks a few boxes as it relates to specific situations and your program will spit out a number of options in order of priority.  A game like Panzerblitz/Leader would be a great example of a game that could utilize something like that (as an example).

I play small scale games like ASL, where there are not to-many chits to complicate things (its easier than making dicisions for lots of chits) I also tend to play a battle on a field as big as my kitchen table with miniatures but are simple card instead of figures ( www.juniorgeneral.org has many chits and graphics for free use) the fewer the number of units the better my solo system works, also Its best not to be strict with the system its a tool to help play

you can also just make big decisions with this system and do the micro-management your own way.

Its worth the work to be able to play a solo game that has real game objectives for your A.I.
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 11, 2016, 10:30:58 AM
good thread about it here

https://boardgamegeek.com/thread/1573128/i-any-boardgame-solo-play-can-be-done

here is a quote from "kyle" there "This thread will revolutionize how designers and publishers deal with bots. Look out "
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 11, 2016, 11:09:39 AM
Chess would work with this system, you can either assign all moves in the position*normally 35 moves) a percentage , OR just the candidate moves(normally 4 or 5), then roll a percentage roll of 2 d10s
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 11, 2016, 01:15:43 PM
choosing good moves or making decisions is why you give them the correct percentage score(I'm sorry if I wasn't clear) a 90% move is 9 times more likely than a 10% move.

I can play chess, so choosing candidate moves is more possible to choose with some idea, chess players will also be able to choose I think, remember - you will always ne able to play to your own ability.

I have played chess with this system
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 11, 2016, 03:43:33 PM
https://boardgamegeek.com/thread/1573128/i-any-boardgame-solo-play-can-be-done

GJK its got 50 posts today, have a look
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: Nefaro on May 11, 2016, 04:10:48 PM
My best solitaire experiences for strategy games have generally been those that used at least one deck of cards, sometimes more, to run the automated opponent. 

As GJK suggested with his example of D-Day At Omaha Beach/Tarawa (or the ancestrally related RAF), the small lists of priority actions or what is essentially individualized flow charts tend to make for a good mix of variety, logic, and surprise. 

Such "AI" mechanics doesn't necessarily need to be on a deck of cards.  But that's the cleanest & most user-friendly format IMO.  It keeps each action in bite-sized chunks that doesn't require a bunch of cross-referencing of multiple player aids and/or books since the info on what the opponent does is all right there on one card.  No die-roll(s), just draw a card and go through it.

I have numerous war & adventure games that use such a system and nearly every one of my favorites use it.

Of course, creating such a card-driven opponent is an assload of work and testing.  So not something you just toss together on the fly.  I have seen occasional User-Created variants of multi-player games which add an automated opponent run by cards.  I've used the one for Descent a few times, for example, but not yet the ones for Imperial Assault from the same creator.  It was more enjoyable than the percentile roll ones, and faster playing too. 

That's not to say there isn't a place for randomly rolling when you want a random choice to be made.  Just that the extra time spent on deck-run solo opponents is appreciable. 
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 11, 2016, 04:24:26 PM
Quote from: Nefaro on May 11, 2016, 04:10:48 PM
My best solitaire experiences for strategy games have generally been those that used at least one deck of cards, sometimes more, to run the automated opponent. 

As GJK suggested with his example of D-Day At Omaha Beach/Tarawa (or the ancestrally related RAF), the small lists of priority actions or what is essentially individualized flow charts tend to make for a good mix of variety, logic, and surprise. 

Such "AI" mechanics doesn't necessarily need to be on a deck of cards.  But that's the cleanest & most user-friendly format IMO.  It keeps each action in bite-sized chunks that doesn't require a bunch of cross-referencing of multiple player aids and/or books since the info on what the opponent does is all right there on one card.  No die-roll(s), just draw a card and go through it.

I have numerous war & adventure games that use such a system and nearly every one of my favorites use it.

Of course, creating such a card-driven opponent is an assload of work and testing.  So not something you just toss together on the fly.  I have seen occasional User-Created variants of multi-player games which add an automated opponent run by cards.  I've used the one for Descent a few times, for example, but not yet the ones for Imperial Assault from the same creator.  It was more enjoyable than the percentile roll ones, and faster playing too. 

That's not to say there isn't a place for randomly rolling when you want a random choice to be made.  Just that the extra time spent on deck-run solo opponents is appreciable.

I have used cards and dice for random games(and I loved these sorts of games) I even look especialy for roguelike games to buy, but my system pre-defines the possible actions then rolls percentage dice to choose the action, the system is not true random, the system thinks and has objectives based on the players ability, so an expected move of say 80% would most of the time happen 4 more times than a 20% action, . the trick is the percentage you give is based on best possible action first then second and maybe a 1% blunder. so the opponent actualy acts with thought not! random.

you can only ever have 100% worth of actions the split is 100% devided between all actions, this is because a human can process 100% easy, each action has a percentage based on how likely it is to happen. its the lower percentage actions when they ocure really change the game, but there not random ,there thought out too

I learned this system from RPG freeform thinking and the need for an ASL opponent, as I play ASL pver a day or two(I'm very slow)
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 11, 2016, 04:58:59 PM
Nef imagine you had a solo game running as you mentioned with 2 dexks of cards maybe (104 cards) , now imagine you invade an island with 3 ships and a unit of commandoes, I ask you now to select the relavant cards only!, card1 "commandoes attack gun emplacements"  card2 "commandoes dig in at the beach" card3 "commandoes run as far inland as they can" card4 "commandoes wait for support"

now its time to create a decision percentage piechart  72% commandoes attack gun emplacements to protect ships from being attacked, 20 % commandoes dig in at the beach, 6 % commandoes run as far inland as they can, 2% commandoes wait for support.

now roll the 2 d10s for card to use ,
its not random . its pre thought out, but you don't know whats going to happen prior the roll
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: gameleaper on May 27, 2016, 07:53:42 AM
http://www.insidegmt.com/?p=10689

looks like the system is evolving
Title: Re: A.I. in any boardgame for solo play can be done like this
Post by: DennisS on July 03, 2016, 09:58:36 AM
Quote from: Nefaro on May 09, 2016, 07:04:00 PM
Quote from: gameleaper on May 09, 2016, 02:48:11 PM
the idea is to make a few rational plans , then decide on which with dice, this gives the plans well thought out responses that are not random,

any number of percentages can be used , no magic numbers

Well.. that's not anything most of us haven't thought about in the past.

I just thought you were emphasizing that specific mix of probabilities as the most interesting.

This was my thought. I have been playing board games solo for 50+ years...and this has ALWAYS been my technique.

Let's take this one step further...add a third ten-sided die, and you can have exceptionally rare events happen. You then have a THOUSAND different events/happenings available.