Page 1 of 1

learning AI

Posted: Wed Sep 03, 2014 2:06 pm
by krux02
what do you think about an AI that memorizes where many aliens died and therefore try to avoid those regions on the next wave.

Re: learning AI

Posted: Wed Sep 03, 2014 2:42 pm
by n9103
If it's limited to something as simple as distance to player, then it might be too dependent/exploitable by the player coming out to meet the biters outside the base, and then luring them over to a turret farm.
If it's as in-depth possible, such as as mapping out the exact positions when they died, and how close they were to power/pollution generators, etc., then that might be too powerful for a mere human to counter.

Those points aside, I, for one, would welcome our robot overlords.

Re: learning AI

Posted: Thu Sep 04, 2014 3:24 am
by therapist
"Brain Bugs?! Frankly, I find the idea of a Bug that thinks offensive!"

Re: learning AI

Posted: Fri Sep 05, 2014 6:53 am
by krux02
if we go in starship troopers direction then I want the alien corpses to pile up until they can walk over my walls :P. But what do you think about an invisible pheromone that is send as soon as an alien dies, so that following aliens know that it is dangerous there and that area might better be avoided. But don't store anything in relative positions to the player, that doesn't make any sens except you want to confuse the player by introducing unlogic to the game.

Re: learning AI

Posted: Fri Sep 05, 2014 1:21 pm
by n9103
Hmm, yea, that could be interesting.
Wonder how easy it would be to create a second pollution-like layer so that it can both spread and dissipate.

Would need some balancing to find out how much of this pheromone to release per kill to get a reasonable effect, but seems like something very insect-like, therefore perfect for the biters (and SST's bugs :P)
Perhaps it would also be an interesting idea for the biter spawns to occasionally spawn a suicide scout to test high pheromone areas to see if the player is shifting defenses away from old spots, and releasing an anti-pheromone if it's not killed as soon as it gets close?

Re: learning AI

Posted: Mon Sep 08, 2014 7:36 am
by ssilk
https://forums.factorio.com/forum/vie ... ilit=smell
And look for pheromone based pathfinding

:)

Re: learning AI

Posted: Fri Sep 12, 2014 10:28 am
by SilverWarior
I actually had similar idea in the past, before the polution system was even implemented, but I have never shared it since as a programmer myself I wanted to do some testing to see if it would work as I imagine. But once polution was implemented abandoned the idea since it is not compatible with polution system.

Now the general idea is that similar as polution system splits map into grid (chunks) and assign polution value of each chunk my idea would also divide map into grid, but much smaller chunks and add danger value to each chunk.
Danger value would be increased every time the biter gets killed in that region. Also it would slowly increase the longer the bieters are in combat.
Of course the danger vaoues would decrease over time like polution values do.
So the danger value would tell biters the estimated danger of certain area. Based on this danger value of certain area and biters strength it woud allow them to decide wheter they would roam into that area or not. And not only that. If you you calculate the biters strength by their numbers (the biters can form into grups) and their health you even get the ability for biter to actuall go and flee the area where the danger becomes to high.
This would avoid bites to mindesly keep running toward some players turets just to get slauthered before they even reach them or to retreat from the batle when heavily wounded.
So in all biters would become much more smarter.
Go and add the abilit for biters to go and folow the edge of the danger zone in order to find a weaknes (area with low danger) in your defence system and you got a quite clever oponent.

Now using my proposed system with basic pathfinding algorithm you could easily dtermine if biter bases could spawn somewhere inside your base perimiter or if the would get slauthered by your defences before breaching it. This would compleetly solved the problem of enemy bases sometimes spawning inside players base perimiter even if the whole base is surrounded by turets which was reported in the past, but not sure wheter it was fixed or not.

Re: learning AI

Posted: Fri Sep 12, 2014 3:48 pm
by n9103
Any chance you're still working on this AI modification SW?
Sounds like a good addition to the pollution mechanic, not a replacement, therefore not unnecessary.
I also don't really know why it would be incompatible, since (AFAIK) the pollution mechanic only determines how often, how strong, and the primary target. Nothing about the path they should take.

Re: learning AI

Posted: Wed Oct 08, 2014 9:52 am
by SilverWarior
Actually I'm planning to use this idea in one game I'm making myself (still in early development). So when I have example of such system I will definitly show it to developers so they can see how it works in practice.
Now when will this happen I unfortunately can't say at this time.

Re: learning AI

Posted: Tue Nov 25, 2014 11:05 pm
by User_Name
I was just about to make a new thread named 'Hive mind" with the same suggestion.

There should be another pollution-like layer that adds pathfinding cost for biters.
Whenever biter dies to turret fire, danger level of the tile rises (and slowly dissipates).
It will make biters probe the whole perimeter for weak spots, and eventually go around the base to try attack from different direction.

Whenever biter destroys something, danger level of the target tile and his approach route should drop significantly below neutral level. It will make series of successive attacks target the same weak spot, even if attack was originated from the other nest, before breaking even (if fruitless)

Whenever spawner is destroyed by player, danger level should gradually flatten out globally, approaching neutral value. It will make biters more stupid and careless about planning their attacks, like if a hive mind loses it's memory cells.