Page 3 of 3

Re: Tablic

PostPosted: Fri May 15, 2015 3:14 am
by Zivouhr
Koala, with Tablic, how long did it take to develop to this point of completion? What was the toughest challenge while programming it?
Are you able to beat the computer often?

Cool card game created using Game-Editor. 8)

Re: Tablic

PostPosted: Fri May 15, 2015 12:52 pm
by koala
Zivouhr wrote:Koala, with Tablic, how long did it take to develop to this point of completion?
It took me more than a month.
Zivouhr wrote:What was the toughest challenge while programming it?
Almost everything was a challenge, but maybe the toughest was programming AI, because I needed to find a way for AI to check all possibilities and pick the best one.
Zivouhr wrote:Are you able to beat the computer often?
I wasn't before, because I was using the same logic as computer. There's a better way to play this game, really simple, and than you can beat computer easily: When you can't get any card, don't place the smallest on talon and save the bigger one. Instead place card big enough so computer can't take many cards from talon. For example, if there are on talon K (14) and 8 and you can't take any card, don't place 3 from your hand, because computer could have A (11) and take 8 and 3. Instead place 7. Then computer will make less damage. Also, you can exploit AI's logic: There are Q (13), 8 and 5 on talon, and you have two Q (13). If you see computer doesn't take those three cards from talon, then you can place one of your Q (13), and in next turn take both Q (13) and 8 and 5.
Zivouhr wrote:Cool card game created using Game-Editor. 8)
Thank you. :D

Re: Tablic

PostPosted: Fri May 15, 2015 5:50 pm
by bat78
Maybe I shall create an engine imagine for artificial intelligence that works based on factor32

Re: Tablic

PostPosted: Fri May 15, 2015 9:30 pm
by koala
bat78 wrote:Maybe I shall create an engine imagine for artificial intelligence that works based on factor32
What is factor32?

Re: Tablic

PostPosted: Fri May 15, 2015 11:18 pm
by bat78
Ehh it's complicated to explain.

Okay virtually this is the smartest system to base the creation of an AI on. It provides facility for control over the human emotions and in variety of different perspectives Koala it doesn't "Think" rather than programming it how to think in real time, which makes it perfect for a game AI.

The idea is not any less simple. You can add up items in an array of structures.
Each of which contains a pointer to a function that contains a do { x } while(y) (videlicet x is a supplement function and y is the argument passed to the function)
As well as 32 "factors" associated to that function to interact with it and define its behavior using 32 settings more or less representative of emotions.
For example factor 4 (variable to be set in the range of 1 - 100 (in percents)) represents confusion, because it determines the level of randomizing each item's priority of execution. Another example would be factor 7 which sets the priority based on time of execution of each function. In real time this is the ability for us to decide which thing is easier to be done. So this is how it works. An example of a very minimalist set:

Code: Select all
add_task(fooPtr_ExitGame); // AI[++]
add_task(fooPtr_PauseGame); // AI[++]

/* sets factor3 to 50% for all the tasks
 * factor3 determines the priority of execution based on amplitude of other actions performed. So if user pauses the game there is more chance both tasks to be executed
 */
global_factorization(offsetof(factor3), 50);


Curious fact. The most dangerous one is factor32, because it represents the "lie" :lol: which means it will behave exactly on the opposite way from the given/received one. Almost like inverting the percentage of all the factors associated to the task(s). It is either used to surprise the player or to make them suffer or to fool them that the AI is stupid.

At the end.. I can assure you that this system is very mathematical and very logical.. and it is known to be settable to work in any circumstances.
You can easily adapt any AI with your game. All you have to do is learn the factors and their purposes. Because a combination of two factors could form an entirely different emotion/behavior or a sequence. It is VERY powerful system.

Re: Tablic

PostPosted: Sat May 16, 2015 12:48 am
by Zivouhr
AI will eventually take over the world I can imagine.

koala wrote:
Zivouhr wrote:Koala, with Tablic, how long did it take to develop to this point of completion?
It took me more than a month.
Zivouhr wrote:What was the toughest challenge while programming it?
Almost everything was a challenge, but maybe the toughest was programming AI, because I needed to find a way for AI to check all possibilities and pick the best one.
Zivouhr wrote:Are you able to beat the computer often?
I wasn't before, because I was using the same logic as computer. There's a better way to play this game, really simple, and than you can beat computer easily: When you can't get any card, don't place the smallest on talon and save the bigger one. Instead place card big enough so computer can't take many cards from talon. For example, if there are on talon K (14) and 8 and you can't take any card, don't place 3 from your hand, because computer could have A (11) and take 8 and 3. Instead place 7. Then computer will make less damage. Also, you can exploit AI's logic: There are Q (13), 8 and 5 on talon, and you have two Q (13). If you see computer doesn't take those three cards from talon, then you can place one of your Q (13), and in next turn take both Q (13) and 8 and 5.
Zivouhr wrote:Cool card game created using Game-Editor. 8)
Thank you. :D


Yes, the AI must have been a challenge to create. Well done.
Thanks, I will try that strategy next time I play Tablic. :o

Re: Tablic

PostPosted: Sat May 16, 2015 6:32 am
by koala
bat78 wrote:Ehh it's complicated to explain.

Okay virtually this is the smartest system to base the creation of an AI on. It provides facility for control over the human emotions and in variety of different perspectives Koala it doesn't "Think" rather than programming it how to think in real time, which makes it perfect for a game AI.

The idea is not any less simple. You can add up items in an array of structures.
Each of which contains a pointer to a function that contains a do { x } while(y) (videlicet x is a supplement function and y is the argument passed to the function)
As well as 32 "factors" associated to that function to interact with it and define its behavior using 32 settings more or less representative of emotions.
For example factor 4 (variable to be set in the range of 1 - 100 (in percents)) represents confusion, because it determines the level of randomizing each item's priority of execution. Another example would be factor 7 which sets the priority based on time of execution of each function. In real time this is the ability for us to decide which thing is easier to be done. So this is how it works. An example of a very minimalist set:

Code: Select all
add_task(fooPtr_ExitGame); // AI[++]
add_task(fooPtr_PauseGame); // AI[++]

/* sets factor3 to 50% for all the tasks
 * factor3 determines the priority of execution based on amplitude of other actions performed. So if user pauses the game there is more chance both tasks to be executed
 */
global_factorization(offsetof(factor3), 50);


Curious fact. The most dangerous one is factor32, because it represents the "lie" :lol: which means it will behave exactly on the opposite way from the given/received one. Almost like inverting the percentage of all the factors associated to the task(s). It is either used to surprise the player or to make them suffer or to fool them that the AI is stupid.

At the end.. I can assure you that this system is very mathematical and very logical.. and it is known to be settable to work in any circumstances.
You can easily adapt any AI with your game. All you have to do is learn the factors and their purposes. Because a combination of two factors could form an entirely different emotion/behavior or a sequence. It is VERY powerful system.
This is some hardcore AI right here. :D

Re: Tablic

PostPosted: Sat May 16, 2015 9:06 pm
by Zivouhr
I haven't beat the AI in Tablic yet, very tough game as the AI always has good sets of cards. I was putting larger cards into the deck, like a king, when I saw there wasn't a king in the Talon (Center cards). I'll hopefully luck out soon since cards are mostly about luck.

Re: Tablic

PostPosted: Sat May 16, 2015 9:21 pm
by koala
Zivouhr wrote:I haven't beat the AI in Tablic yet, very tough game as the AI always has good sets of cards. I was putting larger cards into the deck, like a king, when I saw there wasn't a king in the Talon (Center cards). I'll hopefully luck out soon since cards are mostly about luck.
Cards are randomly dealt, so sometimes you get a good hand, sometimes bad. :D

Re: Tablic

PostPosted: Mon May 18, 2015 12:39 am
by Zivouhr
koala wrote:
Zivouhr wrote:I haven't beat the AI in Tablic yet, very tough game as the AI always has good sets of cards. I was putting larger cards into the deck, like a king, when I saw there wasn't a king in the Talon (Center cards). I'll hopefully luck out soon since cards are mostly about luck.
Cards are randomly dealt, so sometimes you get a good hand, sometimes bad. :D


Okay, good to know, thanks!