Page 41 of 44

Re: LT forum ART and Hobby Center

Posted: Tue Aug 08, 2017 3:16 pm
by Silverware
Dinosawer wrote:
Tue Aug 08, 2017 3:04 pm
That's why you also subtract point for ships on your side dying :V
Yes, that will do it. But then they will figure out that running away is a good idea ;3
So give them more points of they kill them faster, and take away points as time goes on too. :V

Re: LT forum ART and Hobby Center

Posted: Tue Aug 08, 2017 3:31 pm
by Talvieno
Silverware wrote:
Tue Aug 08, 2017 3:16 pm
Dinosawer wrote:
Tue Aug 08, 2017 3:04 pm
That's why you also subtract point for ships on your side dying :V
Yes, that will do it. But then they will figure out that running away is a good idea ;3
So give them more points of they kill them faster, and take away points as time goes on too. :V
Exactly this. And if you subtract too few points for hitting the edges, they'll start sliding along the edges as a tactic. If you add too many, they'll start carefully avoiding the edges or going much more slowly. In extreme cases they might even start (and have started) sitting still and waiting for the enemy to come towards them, leisurely dodging missiles all the way. They are crafty little buggers and they exist solely to exploit anything you do. Balancing for AI is hard. I'm considering making an AI to balance the AI balancing. :?

Re: LT forum ART and Hobby Center

Posted: Tue Aug 08, 2017 3:37 pm
by Dinosawer
So, don't have edg s and let the game world loop on itself instead (what goes off screen right appears left etc), having edges isn't realistic anyway

Re: LT forum ART and Hobby Center

Posted: Tue Aug 08, 2017 3:41 pm
by Talvieno
No it's not, but looping edges gives rise to confusion when it comes to the homebrewed physics engine. :lol: so I'd have to rewrite a lot of that. It's trickier than just 'place them on the other side'

Re: LT forum ART and Hobby Center

Posted: Tue Aug 08, 2017 3:43 pm
by Dinosawer
True, but it's a good and tested way of pretending you have an infinite simulated field while you actually haven't :D

Re: LT forum ART and Hobby Center

Posted: Tue Aug 08, 2017 4:16 pm
by Silverware
Dinosawer wrote:
Tue Aug 08, 2017 3:43 pm
True, but it's a good and tested way of pretending you have an infinite simulated field while you actually haven't :D
Or just have an infinite field, and penalize for distance from enemy :D
Center the camera on the average position, and zoom it based on the max distance from the center of the camera any unit is.

Re: LT forum ART and Hobby Center

Posted: Thu Aug 10, 2017 11:49 pm
by Talvieno
Camera and things.
Spoiler:      SHOW
Recorded at roughly 150 passes:
Image
Anyway, I've been informed that what I'm doing is some kind of cross between a neural network and genetic algorithms. And here I thought I was doing my own thing. :lol: I'm not sure to be proud that I re-invented the wheel at 17, or disappointed that all I did was re-invent the wheel. Anyway, was interesting to make. Many challenges and whatever. No external libraries used. :)

Re: LT forum ART and Hobby Center

Posted: Fri Aug 11, 2017 4:14 am
by F4wk35
How?!?

That sounds like some very, very awful piece of programming weirdness!
And it also sounds like you did it a lot like "Oh, let's see how that goes!"

That shouldn't work! How does that work?!?

(Awesome work btw...but my head just can't comprehend that properly...)

Re: LT forum ART and Hobby Center

Posted: Fri Aug 11, 2017 8:50 am
by Talvieno
Context:
Fawkes in IRC wrote:<Fawkes> it sounds horribly complicated
<Fawkes> like stuff you don't just go ahead and do
<Fawkes> it's an "awful(ly complicated) piece of programming weirdness"
<Fawkes> at least to me
<Fawkes> that sounded better?
Most programming is stuff you just "go ahead and do". :P If you don't, you never get anywhere. Anyway, to explain it simpler (as I tried on IRC): I basically reward things I want it to do, and punish things I don't want it to do. then it learns, through trial and error, over time, which things I want it to do and does those more often.

edit: and a link: http://talvieno.com/sims/aigame/aigame.html
Spacebar slows it down/speeds it up. Blue circles indicate the two players with the highest scores. It simulates the same way regardless of speed. Keeping it sped up just lets it gen up to 16 times faster. :)
also, note: due to its homebrewed nature, occasionally it will "learn itself into a corner". It doesn't happen every time, but when it does, it'll completely stop updating the AI for long periods, and I didn't work out a way to figure it out and get around it quickly. It will get out of it eventually, but may take a fair bit of time.

Re: LT forum ART and Hobby Center

Posted: Fri Aug 11, 2017 12:09 pm
by Dinosawer
Do they actually know where the asteroids are? They seem to be crap at avoiding them even after 1440 iterations

Re: LT forum ART and Hobby Center

Posted: Fri Aug 11, 2017 12:14 pm
by Talvieno
Supposedly, yes. but yeah, they're terrible at avoiding them and I'm not exactly sure why or how to fix it. They have the ability, and sometimes you can tell they're avoiding asteroids, it's just... not a very high priority for them. :?

Re: LT forum ART and Hobby Center

Posted: Fri Aug 11, 2017 12:15 pm
by Dinosawer
Punish crashing harder?
So far, the asteroids win :ghost:

Re: LT forum ART and Hobby Center

Posted: Fri Aug 11, 2017 12:58 pm
by Talvieno
Figured it out. They're basing whether or not asteroids are "dangerous" based on the direction they're currently facing, and not the direction they're currently sliding. As such, they start ignoring asteroids as soon as they're no longer facing toward them, resulting in it being difficult-to-impossible to actually avoid them with any degree of reliability. :lol: My mistake, not theirs. If I fix the code they'll start avoiding them properly.

edit: A thorough investigation reveals that it's because their AI is only updating four times a second (per person) giving an average reaction time of 0.125 seconds, roughly equal to that of a human. HOWEVER, unlike a human, they don't actually know they're near the asteroid at all until they're actually facing it, and after their 4-times-a-second update passes. I've updated it to check eight times a second instead, which may help them figure it out... but we'll see after the next round of tests.

Re: LT forum ART and Hobby Center

Posted: Mon Aug 14, 2017 9:31 am
by Talvieno
I really started looking into it in-depth yesterday and found a multitude of little bugs, largely from the 16 player -> 32 player switch I made, where some of the code wasn't updated for the increased number of players, resulting in weirdness and general AI extremes. This often caused it to pick a single action type and use it for the entirety of a round. ._. It's been fixed now, though. They aren't avoiding asteroids perfectly, but it's a lot higher on their priority list now.

Re: LT forum ART and Hobby Center

Posted: Mon Sep 11, 2017 12:41 am
by JanB1
Talvieno, how you doing such things that I don't even know where I would have to begin with? :o

And that at the age of 17! :x