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.
It took me more than a month.Zivouhr wrote:Koala, with Tablic, how long did it take to develop to this point of completion?
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:What was the toughest challenge while programming it?
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:Are you able to beat the computer often?
Thank you.Zivouhr wrote:Cool card game created using Game-Editor.
What is factor32?bat78 wrote:Maybe I shall create an engine imagine for artificial intelligence that works based on factor32
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);
koala wrote:It took me more than a month.Zivouhr wrote:Koala, with Tablic, how long did it take to develop to this point of completion?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:What was the toughest challenge while programming it?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:Are you able to beat the computer often?Thank you.Zivouhr wrote:Cool card game created using Game-Editor.
This is some hardcore AI right here.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" 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.
Cards are randomly dealt, so sometimes you get a good hand, sometimes bad.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.
koala wrote:Cards are randomly dealt, so sometimes you get a good hand, sometimes bad.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.
Users browsing this forum: No registered users and 1 guest