00:00
00:00
Newgrounds Background Image Theme

LainLover just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

++ As Wars 2007

24,658 Views | 502 Replies
New Topic Respond to this Topic

Response to ++ As Wars 2007 2007-01-05 20:53:09


Alright, I fixed mine. It was YOU, Claxor. Yes, you. I was doing a demo of ours, and you KICKED MY ASS most unpleasantly. So I jacked around with my bot for about two hours and now it's better than EVAR.

...tic-tac-tow would be awesome.

Response to ++ As Wars 2007 2007-01-05 21:29:18


At 1/5/07 08:02 PM, Vengeance wrote:
At 1/5/07 07:48 PM, Bezman wrote: I think the idea was to ensure identical results when the game was run multiple times.
If you look in his code it's half random, but it's going to end up the same each time. He's used trig and a constantly increasing variable to make it seem random when it isn't.

Also, Glaiel, is there a class to go with it or something? Because it just shoots straight up for me....
Either way Vengeance vs. Glaiel.

oh, right lols
http://denvish.net/ulf/1168050405_Vector.as

and the bot fla again
http://denvish.net/ulf/1168043755_glaielbot.f la

(btw the psuedorandom code will be executed the same way every time... it uses the current frame not the current time. Go ahead and test it yourself)

Response to ++ As Wars 2007 2007-01-05 21:33:21


At 1/5/07 08:44 PM, Claxor wrote: Lets make a quick tic-tac-toe comptition? :)
Anyone up for it?

Tic tac toe would be pretty simple. Assuming you're talking about the age-old 3x3 2-dimensional game. I mean, there aren't that many possible states and I think we all already know the 'winning' strategies. (i.e. the strategies that will result in a draw each time if the opponent also utilises them)

A 3D tic-tac-toe bot would be a challenge though. I remember some principle of using a sorta bit 'tree' of all the possible moves, noting the path the game takes, then either increasing or decreasing the priority of doing the same move if we ever reach the same point, depending upon whether the bot wins/loses.

I guess you'd call it a brute-force method and though it'd probably need thousands of games to get brilliant (though a few simple algorithms for when priority is equal could make it a decent opponent vs a human until then) it could maybe be a fun challenge for someone. Like make 2 bots and get them to play each other and somehow gather data while they plan constant matches.

I'm sure folk like A_B already know all about how to do that kinda stuff far, far better than I.

Response to ++ As Wars 2007 2007-01-05 21:34:02


Alright, so, everybody's been working hard on their bots, so I came up with a little treat. Behold a 4-bot random-start-location demo battle between myself, AuthorBlues, Claxor and Vengeance. Keep in mind that start points are random for this demo, so watch it a few times for different results.

Anyway, here it is: http://img381.imageshack.us/img381/1741/match 1xx3.swf

Response to ++ As Wars 2007 2007-01-05 21:48:34


At 1/5/07 09:34 PM, Defrag wrote: Anyway, here it is: http://img381.imageshack.us/img381/1741/match 1xx3.swf

I watched it a bunch of times. The strongest were defrag and claxxor. Vengeance did alright but AB didnt win at all. Usually it was between defrag n clax. Surpisingly fun to watch. I love seeing the victory moves like the flames and claxx's "i have no dance"


BBS Signature

Response to ++ As Wars 2007 2007-01-05 22:01:01


say what if for the next one we did a connect-4 AI challenge?

(I like these's AI challenges)

Response to ++ As Wars 2007 2007-01-05 22:12:57


I love these AI tasks too.

I vote for more of these. I may make one myself even.

Should we make a website off NG to start these on? It would be a good place to collaberate and attract outside attention too.


At first there was nothing, then it exploded. - Big bang

Response to ++ As Wars 2007 2007-01-05 22:18:18


Oh, and one other thing, what will be our exact start positions on the game grid because its critical for my movement code....


At first there was nothing, then it exploded. - Big bang

Response to ++ As Wars 2007 2007-01-05 22:38:07


I'm not sure (as I can't fully understand the movement function) but I think there's a bug in that function, basically meaning that we'll 'stick' to a wall if we touch one.

Just that in tests, my bot can move OK, but as soon as it touches the corner, with the same values for moveX and moveY, it'll just stick in that corner (and it's directed away).

Response to ++ As Wars 2007 2007-01-05 23:06:56


The reason for that is a poorly coded movement algorithm. Basically, the game tries to stop you from moving outside of the game boundaries by saying the reverse, which is that if your bot is outside of the game boundaries, don't move at all. The exact piece of code is this:

if (arg._x>0+arg._width/2 && arg._x<Stage.width-100-arg._width/2 && (x1<=2 && x1>=-2)) {
arg._x += x1*speed;
}

if (arg._y>0+arg._height/2 && arg._y<Stage.height-arg._height/2 && (y1<=2 && y1>=-2)) {
arg._y += y1*speed;
}

...Which would work much better (And solve the sticking problem) if it were instead:

arg._x += x1*speed;
arg._y += y1*speed;

if(arg._x>0+arg._height/2) arg._x=0;
if(arg._x<Stage.height-arg._width/2) arg._x=Stage.width-arg._width/2;
if(arg._y>0+arg._height/2) arg._y=0;
if(arg._y<Stage.height-arg._height/2) arg._y=Stage.height-arg._height/2;

...Just a piece of my mind. =P. I noticed the sticking, and it bothered me, because in one possible outcome of the random start positions, it caused me to lose.

Response to ++ As Wars 2007 2007-01-05 23:30:43


At 1/5/07 11:06 PM, Defrag wrote: ...Just a piece of my mind. =P. I noticed the sticking, and it bothered me, because in one possible outcome of the random start positions, it caused me to lose.

Well, if you noticed the sticking, there's no reason for it to cause you to lose.

I mean, just test if you're near the border, and limit yourself to moving within a smaller square. That's what I've done to ensure I don't keep sticking again.

I still don't understand the function though, with the crazy AS2 code.
What is 'arg'?
Is that the code referencing the mc that called the function?
So arg._x is the _x value of whatever mc called it?

Response to ++ As Wars 2007 2007-01-05 23:34:02


At 1/5/07 11:30 PM, Bezman wrote: Is that the code referencing the mc that called the function?

yeah, the functions look like this: reload=function(arg:MovieClip). Then when they're called it's reload(this);

So arg._x is the _x value of whatever mc called it?

Yeah, whenever the word arg comes up it things arg=_level0.yourbot so, arg._x _level0.yourbot._x
Understand?


========|| WWWWWWWW>[-[Blog] - [Audio] - [Userpage] - [Flash] - [Last.fm]-]<WWWWWWWW ||========

BBS Signature

Response to ++ As Wars 2007 2007-01-05 23:39:31


At 1/5/07 11:34 PM, Vengeance wrote:
At 1/5/07 11:30 PM, Bezman wrote: Is that the code referencing the mc that called the function?
yeah, the functions look like this: reload=function(arg:MovieClip). Then when they're called it's reload(this);
So arg._x is the _x value of whatever mc called it?
Yeah, whenever the word arg comes up it things arg=_level0.yourbot so, arg._x _level0.yourbot._x
Understand?

Yeah. Ta.

Btw, just now your bot is the only one I have access to that can beat mine.

I've just gotta insert some dodging and my bot will be unstoppable!

Response to ++ As Wars 2007 2007-01-05 23:44:39


At 1/5/07 11:39 PM, Bezman wrote: Btw, just now your bot is the only one I have access to that can beat mine.

hehehe, funny thing. I deleted mine because I wasn't happy with it. My new one pwns my old one :P


========|| WWWWWWWW>[-[Blog] - [Audio] - [Userpage] - [Flash] - [Last.fm]-]<WWWWWWWW ||========

BBS Signature

Response to ++ As Wars 2007 2007-01-06 00:25:07


How do I fucking check for bullets since the actual MC's are stationary? I have to localToGlobal the inside MC? I don't wanna go through that


wtfbbqhax

Response to ++ As Wars 2007 2007-01-06 00:31:24


At 1/5/07 11:44 PM, Vengeance wrote:
At 1/5/07 11:39 PM, Bezman wrote: Btw, just now your bot is the only one I have access to that can beat mine.
hehehe, funny thing. I deleted mine because I wasn't happy with it. My new one pwns my old one :P

Scary.

Oh, and I was thinking that Claxor's game-thing could actually be fun if we added in time-limits (after which you lose a life) and a scoring system after each level (giving points for speed/lifeleft). And a few levels of course, with a variety of bots, bot healths and enemy numbers.

I'm just saying that it would be a fun thing to maybe do after the fights are over.

And on a totally seperate note, anyone have a link to the original wars?

Response to ++ As Wars 2007 2007-01-06 00:37:24


At 1/6/07 12:25 AM, fwe wrote: How do I fucking check for bullets since the actual MC's are stationary? I have to localToGlobal the inside MC? I don't wanna go through that

That's part of the fun =P Hint: use trig, it's rotation and the mc 'inside' inside each bullet to do it

At 1/6/07 12:31 AM, Bezman wrote: Scary.

Demo: Here I beat Glaiel by one frame then die.

Oh, and I was thinking that Claxor's game-thing could actually be fun if we added in time-limits (after which you lose a life) and a scoring system after each level (giving points for speed/lifeleft). And a few levels of course, with a variety of bots, bot healths and enemy numbers.

yeah it would be pretty fun. I mean, see if we can make an intelligence smarter than our own :P

I'm just saying that it would be a fun thing to maybe do after the fights are over.

and submit it =P

And on a totally seperate note, anyone have a link to the original wars?

Nope, soz.


========|| WWWWWWWW>[-[Blog] - [Audio] - [Userpage] - [Flash] - [Last.fm]-]<WWWWWWWW ||========

BBS Signature

Response to ++ As Wars 2007 2007-01-06 03:45:22


At 1/5/07 05:37 PM, Vengeance wrote: If yours just shoots, dodges, moves & heals at set intervals then you're pretty screwed =)

lol yes, but I mean, maybe we could have more variety? Like weapons on the ground that we can pick-up and use :P.

Response to ++ As Wars 2007 2007-01-06 05:40:10


I tested my bot with 3 claxors on the Arena, my bot (easily :P) won. It's about 20% complete now, I hope it will be done for tonight


BBS Signature

Response to ++ As Wars 2007 2007-01-06 06:23:37


At 1/6/07 12:25 AM, fwe wrote: How do I fucking check for bullets since the actual MC's are stationary? I have to localToGlobal the inside MC? I don't wanna go through that

I just detected when someone's shotAngle was pointing at me and assumed that id it was then they're shooting at me. The bullets move so fast that its not far off actually finding out if a bullet itself is coming towards you.

Response to ++ As Wars 2007 2007-01-06 06:27:49


Also, i was thinking. Do you think it would work if we had AI chess battles? Chess is obviously a lot more complicated than shooting and healing, so the bots would all probably be a bit crappy, but i reckon we could still pull off a decent game of chess between the bots.

Response to ++ As Wars 2007 2007-01-06 06:29:30


The hard part is to dodge bullets, you'll have to figure out a way yourself.


BBS Signature

Response to ++ As Wars 2007 2007-01-06 07:24:30


At 1/5/07 09:34 PM, Defrag wrote: Anyway, here it is: http://img381.imageshack.us/img381/1741/match 1xx3.swf

The first time I watched, I won! :D (though I died as well, but I killed you before your bullets killed me :P)


BBS Signature

Response to ++ As Wars 2007 2007-01-06 07:29:25


At 1/6/07 06:27 AM, Cybex wrote: Also, i was thinking. Do you think it would work if we had AI chess battles? Chess is obviously a lot more complicated than shooting and healing, so the bots would all probably be a bit crappy, but i reckon we could still pull off a decent game of chess between the bots.

I doubt too many people would have the patience.. (I probably wouldn't :P)
Though with a bit of min-max-ing you could make a pretty good bot :D


BBS Signature

Response to ++ As Wars 2007 2007-01-06 07:36:19


At 1/5/07 11:39 PM, Bezman wrote: Btw, just now your bot is the only one I have access to that can beat mine.

Weird, I kick your ass every time.. :O
Have you updated it since you sent it to me?


BBS Signature

Response to ++ As Wars 2007 2007-01-06 07:42:52


At 1/6/07 12:31 AM, Bezman wrote: And on a totally seperate note, anyone have a link to the original wars?

Check a few pages back, I think jmbt posted them a few times :)

posting-spree

BBS Signature

Response to ++ As Wars 2007 2007-01-06 07:43:17


At 1/6/07 07:29 AM, Claxor wrote: I doubt too many people would have the patience.. (I probably wouldn't :P)
Though with a bit of min-max-ing you could make a pretty good bot :D

Yeah, but even if you just made it check to see if theres any way you can get an enemies piece and if you can't you just do pawns to start with and then the bigger guys, just bases on who's more vulnerable, we could still get a game of chess going.

Response to ++ As Wars 2007 2007-01-06 07:55:36


At 1/6/07 07:43 AM, Cybex wrote: Yeah, but even if you just made it check to see if theres any way you can get an enemies piece and if you can't you just do pawns to start with and then the bigger guys, just bases on who's more vulnerable, we could still get a game of chess going.

An incredebly laughable game of chess, that is :P


BBS Signature

Response to ++ As Wars 2007 2007-01-06 08:14:33


At 1/6/07 12:25 AM, fwe wrote: How do I fucking check for bullets since the actual MC's are stationary? I have to localToGlobal the inside MC? I don't wanna go through that

You could just use trig:

bullet._x, bullet._y for the first frame.
bullet._x + 8 * Math.sin(bullet._rotation * Math.PI / 180), bullet._y - 8 * Math.cos(bullet._rotation * Math.PI / 180) for the second frame.
bullet._x + 16 * Math.sin(bullet._rotation * Math.PI / 180), bullet._y - 16 * Math.cos(bullet._rotation * Math.PI / 180) for the third frame, and so on.

Obviously it's shorter if you store the bullet's rotation in radians in its own variable, but meh.


BBS Signature

Response to ++ As Wars 2007 2007-01-06 08:44:44


At 1/5/07 09:35 AM, authorblues wrote: the trick to it is getting it to think like you would. if you had the ability to heal yourself in battle, wouldnt you start being concerned with healing if your health got to below about 50%. so you tell your bot, "hey, if your life is less than 50, spend some time healing". simple as that.

I fully disagree with that, I let my bot take 'perefect' machine decisions rather than count on my human decisions, cause we all know humans make mistakes.


BBS Signature