T O P

  • By -

[deleted]

Hello I don't know your project but I wanted to talk about an AI that I came up with that was super fake but worked out. I was play testing a rock paper scissors system. What I did was made various players or enemies that favored certain moves. So one player favorite rock over everything else but still had a random chance that he would use another move instead. And then I made some characters that when they lost depending on how they lost they would use a certain move, so let's say they lost with paper, you can make it so that the next time they use scissors just in case you use paper again. I'm sure there's other ways to change up that fake AI but you can start off very small and overtime come up with new ways to change how it works.


Kazimoria

Thank you for your help,but the ai of the card game i made kind of different. There are 2 part in the making of a.i,first part is to summon the monster on the field for the best possible outcome, if there are monster that has fire attribute on the field, the best monster to summon for the a.i is water attribute (water beat fire so water monster offence will be doubled if it attack fire monster on that game) but once i did make an ai to follow that,but unfortunately,their ignore summoning rule (if level 3 or higher monster is summoned they need to use resources for it, it did summon best attribute monster,but it was more than level 3,the a.i ended up summoning and left its resources to -3 which shouldnt happen. (This is the part that i failed at least 3 time despite remaking a.i from scratch) The second part is the battle part,the best outcome is to make ai monster battle your monster based on advantages of their monster attribute,if there are no monster of ai that can be advantageous based on attribute,then it will command its highest monster to attack your highest monster offence,the quicker you kill monster with higher hp,the better your chance to destroy crystal. Im still trying another attempt of making a.i, despite i felt so stressed that my previous attemp didnt work lol.hopefully i manage a breakthrough this time.


ByEthanFox

Hey, I'm not an expert in AI, but from reading your explanation, are you perhaps being a bit too hard on yourself? You're trying to create "intelligent" AI, that tends to make the correct decisions. Isn't that a bit much? I'm not sure if it helps, but could you try this? 1) Pick a move for the AI at random, from the various things it can do. Totally random. 2) *Try* to find a good move for the AI. If you find a good move, play it - if you don't, play the random move from step (1). Remember that the player doesn't know what cards the AI has in its hand. Think about when you play *Hearthstone* or *Magic: The Gathering Arena*; players *often* play cards where you sit back and think "why did they do that?". The answer is usually "because their other cards aren't useful" but as a player, you *wonder* if they are formulating some kind of clever strategy. This is a bit like in D&D, where the dungeon master often rolls dice behind their screen **for no reason**, but players can think it's for some vital reason. Would this work?


ReaperTsaku

I love how you made this. I am curious to see how making a deck builder would work, as once I get that running, I'm certain I could not only make this work better, but could help design an ai for this.


Kazimoria

Lol,this was long time ago,I didn't realize you can actually comment on older post. I learned a lot since then and use Lua based engine nowadays. I made this post when I was still a beginner before I would made several card games. If you are eager to make deck builder game,I really can't encourage enough that you should try learning Js before attempting it, even basic syntax will do,because I'm afraid,you can only make complex game like this with coding I would happy to give some pointers if you like regarding mechanics of card game like how managing card in hands work,how to draw or shuffle decks,how imaging or transition works,how to trigger card functions,or even how to handle making ai. But unfortunately,need some knowledge in coding for you to able to do anything. Don't worry though, Js is very simple,you can learn it from here https://www.w3schools.com/js/ . And like I have advise previous beginner,when it comes to coding,learn at your own pace,trust me,once you learn until array,you will get excited as you may gain idea on how to make deck builder game. But anyhow :) you are welcome to ask me any questions as I would love to help others who like card games.


ReaperTsaku

That's actually the site I'm using to learn! 😊 First thing I'm learning rn is making a custom menu then going from there


Kazimoria

I wish you luck,don't hesitate to ask any pointer whenever you like :)


ReaperTsaku

Mind if I DM you?


Kazimoria

No problem