Tuxé
  • Tuxé
  • Newbie Topic Starter
2013-12-28T23:22:38Z
I wish Al mode more competitive, it takes a lot of stupid decisions such as playing a blue-eyes withe dragon in defense mode when i had a weaker monster or spend all the cards you have on the hand without doing nothing right. Apart from that many congratulations for the work done.
dkates
2013-12-29T15:47:06Z
Pretty much with you on this.

I'm not actually doing any of the coding on the AI, but from what I've been able to glean, the AI is still in its infancy. The AI that comes with the program (Sebrian's, if I recall) has a few cards that it's individually scripted to know when/how to use, but it will also activate everything it can. That last part is what leads to a lot of the stupid plays. (If you're wondering why it's there, it's basically a workaround to make sure the AI doesn't skip mandatory effects, and that it won't just sit there and do nothing.)
Sebrian
2013-12-29T17:18:10Z
Originally Posted by: dkates 

Pretty much with you on this.

I'm not actually doing any of the coding on the AI, but from what I've been able to glean, the AI is still in its infancy. The AI that comes with the program (Sebrian's, if I recall) has a few cards that it's individually scripted to know when/how to use, but it will also activate everything it can. That last part is what leads to a lot of the stupid plays. (If you're wondering why it's there, it's basically a workaround to make sure the AI doesn't skip mandatory effects, and that it won't just sit there and do nothing.)



It will sit there and do nothing if you code it to be that way, you understood nothing of AI's code, sorry.
dkates
2013-12-29T17:50:17Z
Well, excuse me! (You're right, though, I really don't understand the AI code, only what descriptions I've seen of some bits and pieces.)
Snarky
2013-12-30T07:58:15Z
Originally Posted by: Sebrian 


It will sit there and do nothing if you code it to be that way, you understood nothing of AI's code, sorry.



Don't be rude :p


Originally Posted by: Tuxé 

I wish Al mode more competitive, it takes a lot of stupid decisions such as playing a blue-eyes withe dragon in defense mode when i had a weaker monster or spend all the cards you have on the hand without doing nothing right. Apart from that many congratulations for the work done.



Originally Posted by: dkates 

Pretty much with you on this.

I'm not actually doing any of the coding on the AI, but from what I've been able to glean, the AI is still in its infancy. The AI that comes with the program (Sebrian's, if I recall) has a few cards that it's individually scripted to know when/how to use, but it will also activate everything it can. That last part is what leads to a lot of the stupid plays. (If you're wondering why it's there, it's basically a workaround to make sure the AI doesn't skip mandatory effects, and that it won't just sit there and do nothing.)



Yugioh is a very complex game, and the tools we have at our disposal to make the AI work are somewhat limited. Unfortunately it is almost impossible for us to code even very simple generic rules (like "use all kinds of destruction effects only on cards you can actually destroy"). So we are basically forced to code most cards that can be misused individually.

This is why we currently focus on making specific decks for the AI and allowing it to handle these decks somewhat nicely. It is impossible for us to make it use every single card, but by limiting it to specific decks, we can improve its performance by a lot.

Of course, it won't be perfect still, as it is impossible to account for every possible interaction with other cards as well, Yugioh is just too complex for that. But I like to think, that the AI can pilot the decks we made for it somewhat decently. Feel free to try out my most recent addition, an AI for a FireFist deck, you can find it in this post .
sredoje
2013-12-30T09:37:22Z
So Snarky when we will get Heraldic Beast script what do you think,and what deck next are planing to do.I know its not easy to script but i jost have to asc since HB are my favorite type.
ZerX
2013-12-30T15:09:14Z
Originally Posted by: Snarky 


Yugioh is a very complex game, and the tools we have at our disposal to make the AI work are somewhat limited. Unfortunately it is almost impossible for us to code even very simple generic rules (like "use all kinds of destruction effects only on cards you can actually destroy"). So we are basically forced to code most cards that can be misused individually.

This is why we currently focus on making specific decks for the AI and allowing it to handle these decks somewhat nicely. It is impossible for us to make it use every single card, but by limiting it to specific decks, we can improve its performance by a lot.

Of course, it won't be perfect still, as it is impossible to account for every possible interaction with other cards as well, Yugioh is just too complex for that. But I like to think, that the AI can pilot the decks we made for it somewhat decently. Feel free to try out my most recent addition, an AI for a FireFist deck, you can find it in this post .



I think it'll work better with basic decks. Anyway, I always think of ai mode as a test for my decks before going online. It would be fine for me if it didn't do dumb moves though.
UserPostedImage
Snarky
2014-01-03T08:17:47Z
Originally Posted by: sredoje 

So Snarky when we will get Heraldic Beast script what do you think,and what deck next are planing to do.I know its not easy to script but i jost have to asc since HB are my favorite type.



I didn't work on HB for the past 2 weeks, picking them up again today. Not sure, how long it will take, though.

I really like Harpies, at some point I will probably attempt to create an AI for them.
joashp
2014-01-05T05:47:43Z
I really admire how the developers and programmers here share their time to debug the scripts. And I also want to quote that scripting and authoring are extremely hard. Even when playing against Konami AI's like Tagforce on PSP, some of the AI's decisions are quite predictable so we cannot blame them because it requires trial-and-error.

I myself want to improve the game and only if I have the skill to do scripts, I can do this during my free time but my knowledge here is almost very natal (unfortunately I can do more on the creative side). I'm a multimedia artist and I wish I can share something to help the game. Like creating the animation for Fusion, Ritual, Syncho, Xyz Summon, or Final Countdown effect, Activating effects or Exodia Animation and the likes. I can provide them if I'll be instructed well what the game needs and how am I suppose to export the effects (like file extensions).

I'm willing to cooperate with the developers on a scheduled basis.
Snarky
2014-01-05T12:47:31Z
Originally Posted by: joashp 

I really admire how the developers and programmers here share their time to debug the scripts. And I also want to quote that scripting and authoring are extremely hard. Even when playing against Konami AI's like Tagforce on PSP, some of the AI's decisions are quite predictable so we cannot blame them because it requires trial-and-error.

I myself want to improve the game and only if I have the skill to do scripts, I can do this during my free time but my knowledge here is almost very natal (unfortunately I can do more on the creative side). I'm a multimedia artist and I wish I can share something to help the game. Like creating the animation for Fusion, Ritual, Syncho, Xyz Summon, or Final Countdown effect, Activating effects or Exodia Animation and the likes. I can provide them if I'll be instructed well what the game needs and how am I suppose to export the effects (like file extensions).

I'm willing to cooperate with the developers on a scheduled basis.



You should probably contact Percival directly in this case. AI development is pretty much independent of the core program, all we do is use the script they provide for us. We don't have anything to do with the core program, which handles all the animations and stuff.
Imakuni
2014-01-06T01:11:18Z
Originally Posted by: joashp 

I really admire how the developers and programmers here share their time to debug the scripts. And I also want to quote that scripting and authoring are extremely hard. Even when playing against Konami AI's like Tagforce on PSP, some of the AI's decisions are quite predictable so we cannot blame them because it requires trial-and-error.

I myself want to improve the game and only if I have the skill to do scripts, I can do this during my free time but my knowledge here is almost very natal (unfortunately I can do more on the creative side). I'm a multimedia artist and I wish I can share something to help the game. Like creating the animation for Fusion, Ritual, Syncho, Xyz Summon, or Final Countdown effect, Activating effects or Exodia Animation and the likes. I can provide them if I'll be instructed well what the game needs and how am I suppose to export the effects (like file extensions).

I'm willing to cooperate with the developers on a scheduled basis.



The problem with making AI is that it only does what you ordered it to. For example, when chaining traps: there are traps that you want to chain as soon as possible; others you wait until a certain condition is met for optimal usage; and you might even just use it "when the time is right".

How can the AI know this things? Does it depend on the trap in question? And does it depend on one of the current field settings? A few quick math: there 4436 monsters registered right now. There are 10 monsters slots per field, and monsters can be: face-up/down and attack/def mode. 4436*10*2*2 = 177440 different monster slot cases. That, excluding tokens, effects being negated, attack/lvl/def/rank/type changing, and so on!

You can't program each cenario on it's own, so you have to program general cases. Whenever someone finds a situation where this general case solving is not good, an exception for particular cases should be added. That's what we have currently.

Still, if you want a top-notch AI, you must get a Deck, and program an AI to all cases with only the cards used within that particular deck. While, in theory, this would be possible for a general AI, the source code would become way too big for this to be ever valid.

If you want to help develop the AI, the best way is to learn .lua basics and go on fixing all mistakes you find; from time to time, group up a bunch of fixes/upgrades, give it to someone in charge of the AI and call it a 'patch'.
Stevemagegod
2014-01-23T03:17:34Z
Originally Posted by: Snarky 

Originally Posted by: Sebrian 



Originally Posted by: dkates 

Pretty much with you on this.

I'm not actually doing any of the coding on the AI, but from what I've been able to glean, the AI is still in its infancy. The AI that comes with the program (Sebrian's, if I recall) has a few cards that it's individually scripted to know when/how to use, but it will also activate everything it can. That last part is what leads to a lot of the stupid plays. (If you're wondering why it's there, it's basically a workaround to make sure the AI doesn't skip mandatory effects, and that it won't just sit there and do nothing.)



Yugioh is a very complex game, and the tools we have at our disposal to make the AI work are somewhat limited. Unfortunately it is almost impossible for us to code even very simple generic rules (like "use all kinds of destruction effects only on cards you can actually destroy"). So we are basically forced to code most cards that can be misused individually.

This is why we currently focus on making specific decks for the AI and allowing it to handle these decks somewhat nicely. It is impossible for us to make it use every single card, but by limiting it to specific decks, we can improve its performance by a lot.

Of course, it won't be perfect still, as it is impossible to account for every possible interaction with other cards as well, Yugioh is just too complex for that. But I like to think, that the AI can pilot the decks we made for it somewhat decently. Feel free to try out my most recent addition, an AI for a FireFist deck, you can find it in this post .



How about we just use the Code already on Github and have the AI access each script independently and then from there determine the best actions for each card. That would cut down on a lot of issues that the AI faces. Like Marshmallon it would receive the effect from Git and then it would place it facedown in def mode for example. Instead of playing it in face up attack mode causing it to lose the duel.

Snarky
2014-01-23T04:22:01Z
So you want the AI script to read out the code of the card, interpret it and derive actions from there? That would be ridiculously complicated, if not just downright impossible. At least I wouldn't even know, where to start.
FTON
  • FTON
  • Advanced Member
2014-01-23T18:12:13Z
I took a custom cards for a test, the AL Special Summons a Powerful monsters, then it destroys it by itself, i don't know, the CPU wasn't well programed.
Steeldarkeagel
2014-01-23T18:16:29Z
Originally Posted by: FTON 

I took a custom cards for a test, the AL Special Summons a Powerful monsters, then it destroys it by itself, i don't know, the CPU wasn't well programed.



The A.I will most likely never be able to use custom cards as they have not been programmed to be able to use them. If you want to play the A.I use the A.I decks with the correct A.I.
Marc
  • Marc
  • Advanced Member
2014-01-23T19:13:58Z
Someone mentioned that to make the AI better, you would need to program in every card (or at least the currently popular ones.) Is anyone working on that or planning to?
Snarky
2014-01-23T21:34:41Z
There are several people working on, or assisting with AI coding. Sebrian did the main bulk so far, but is currently not continuing his work, he might come back at some point. Skaviory and me provided some additional code and magic has his own AI version in this thread .

We are slowly adding more and more cards, we might never be able to add every single card, but we try to add commonly played ones and add specific decks the AI can play somewhat decently. Currently, I am working on a Heraldic Beast deck and improving my Firefist AI (which might have been included in the latest update? Not sure).
Sebrian
2014-01-23T21:47:53Z
Originally Posted by: Snarky 

There are several people working on, or assisting with AI coding. Sebrian did the main bulk so far, but is currently not continuing his work, he might come back at some point. Skaviory and me provided some additional code and magic has his own AI version in this thread .

We are slowly adding more and more cards, we might never be able to add every single card, but we try to add commonly played ones and add specific decks the AI can play somewhat decently. Currently, I am working on a Heraldic Beast deck and improving my Firefist AI (which might have been included in the latest update? Not sure).



I might start working on AI again pretty soon, but to be honest my goal was to make core for the ai, and rework it to make it easier to work with in future.

About fire fist and other additional decks, i would still like to implement them in the old way (adding them to core scripts) rather than making standalone scripts for every deck, as they are pretty messy and hard to understand at first (at least for me).
Users browsing this topic