This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-06-01 11:05:57

RacerZmanx1
Scratcher
Registered: 2009-01-01
Posts: 54

AI help (yet again)

No-one appears to have been paying attention when I asked the first time, so let me ask again- does ANYONE know how to program an AI for an Advance Wars style game? Anybody?

johnnydean1 wrote:

Hmmm what type. (never played advance wars)

Basically, the AI needs to move a sprite towards/away from another sprite (away if the opposing sprite is too strong for it, towards if it wants to hunt the sprite down), if within range check to see whether it's worth firing or not, and have a list of all the sprites so it knows when to end it's turn.

Last edited by RacerZmanx1 (2010-06-01 12:22:02)


Fight for what is good, fight against what is bad, and be as epic as the entire Pokemon series while doing so.

Offline

 

#2 2010-06-01 11:23:00

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: AI help (yet again)

Hmmm what type. (never played advance wars)


You can now reach me on Twitter @johnnydean1_

Offline

 

#3 2010-06-01 12:22:29

RacerZmanx1
Scratcher
Registered: 2009-01-01
Posts: 54

Re: AI help (yet again)

All replies to queries will be on the first post.


Fight for what is good, fight against what is bad, and be as epic as the entire Pokemon series while doing so.

Offline

 

#4 2010-06-01 12:29:04

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: AI help (yet again)

Give me a hour or 2 and ill try


You can now reach me on Twitter @johnnydean1_

Offline

 

#5 2010-06-01 12:49:11

RacerZmanx1
Scratcher
Registered: 2009-01-01
Posts: 54

Re: AI help (yet again)

Thanks!


Fight for what is good, fight against what is bad, and be as epic as the entire Pokemon series while doing so.

Offline

 

#6 2010-06-01 13:19:14

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: AI help (yet again)

I am making the basic game, of which you can see how the AI works. I am explaining everything.


You can now reach me on Twitter @johnnydean1_

Offline

 

#7 2010-06-01 13:33:09

calebxy
Scratcher
Registered: 2009-12-31
Posts: 1000+

Re: AI help (yet again)

Have a variable for the strength. Do that on every sprite. Now all you have to do is see if a sprite is stronger than the AI. For the distance thing, just use the distance from sprite block. I won't go into to much detail since I'm on my iPod touch.


I'm making my own Doctor Who series!  big_smile  See the first episode here.
And please join Story Zone!  big_smile

Offline

 

#8 2010-06-01 14:12:25

RacerZmanx1
Scratcher
Registered: 2009-01-01
Posts: 54

Re: AI help (yet again)

That's a pretty good base, but I do need something more refined. Thanks for helping anyway!


Fight for what is good, fight against what is bad, and be as epic as the entire Pokemon series while doing so.

Offline

 

#9 2010-06-01 14:21:08

calebxy
Scratcher
Registered: 2009-12-31
Posts: 1000+

Re: AI help (yet again)

RacerZmanx1 wrote:

That's a pretty good base, but I do need something more refined. Thanks for helping anyway!

Are you talking about me? If you are, thank you!


I'm making my own Doctor Who series!  big_smile  See the first episode here.
And please join Story Zone!  big_smile

Offline

 

#10 2010-06-01 14:33:21

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: AI help (yet again)

Im 1/2 way there


You can now reach me on Twitter @johnnydean1_

Offline

 

#11 2010-06-01 15:18:16

RacerZmanx1
Scratcher
Registered: 2009-01-01
Posts: 54

Re: AI help (yet again)

calebxy wrote:

RacerZmanx1 wrote:

That's a pretty good base, but I do need something more refined. Thanks for helping anyway!

Are you talking about me? If you are, thank you!

Yes, Yes I am.


Fight for what is good, fight against what is bad, and be as epic as the entire Pokemon series while doing so.

Offline

 

#12 2010-06-01 15:20:46

RacerZmanx1
Scratcher
Registered: 2009-01-01
Posts: 54

Re: AI help (yet again)

I'm going to bed soon, so I'll check it out tomorrow. Thanks again!


Fight for what is good, fight against what is bad, and be as epic as the entire Pokemon series while doing so.

Offline

 

#13 2010-06-01 15:41:52

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: AI help (yet again)

I am 3/4 of the way


You can now reach me on Twitter @johnnydean1_

Offline

 

#14 2010-06-01 16:57:45

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: AI help (yet again)

This took me 3 hours: http://scratch.mit.edu/projects/johnnydean1/1092100


You can now reach me on Twitter @johnnydean1_

Offline

 

Board footer