Post news RSS AI development effort

AI development: pathfinding and unit selection with reinforcement learning.

Posted by on

I've added pathfinding: AI now finds a way around defenses. Although I'm still working, I'm trying to use reinforcement learning to make AI choose to build what it thinks it's the best to build in its situations.

Comments
Trempler
Trempler

now that looks cool :)
Good work keep it coming

Reply Good karma Bad karma+1 vote
Templarfreak
Templarfreak

Situational/conditional pathfinding AND reinforcement learning algorithm? You're really taking ORA to the next level, man.

Reply Good karma Bad karma+1 vote
23-down
23-down

Indeed a very fascinating project. Ofc against a human player none of these 2 ai's would survive very long. By the time they first attack the humans will have a solid army themselves. Once they determine the basic ai attack route it'll become even easier. Also I don't think it's very smart to test your ai routines with all these custom made units that are not part of RA1. It may falsify your test results. Assuming of course you're also balancing the ai's to each other.

Other aspects I would probably teach your ai's would be to let em calculate when ore is running low for them so that they begin moving their main or a secondary mcv to the next greater resource expansion on the map. Just like humans would do.

Eventually if you can let the ai's form several attack groups. So instead of 1 major predictable blop let em spread into several battle groups approaching their targets from numerous positions. Only an unpredictable ai is a worthy ai. :)

All in all as said before this shows a lot of potential so please continue. Good luck.

Reply Good karma Bad karma+1 vote
boolbada Author
boolbada

Indeed :) If I can make a non-cheating AI that can beat humans then I'd be a star (not possible haha)

Reply Good karma+1 vote
Templarfreak
Templarfreak

There are tons of AIs for StarCraft that are way, way better than like 70% of players. They're at the least a B- level player and some pros at the game can even be caught off guard or defeated by them.

You should take a look at StarCraft AI Tournmanet and BWAPI.

Crazy unpredictable tactics, counter attacks, and flanks can only get you so far. But if you're better at macroing and positioning than your opponent than you have a massive advantage. The trick is to be better at everything than a human player, because it's impossible for a human player to be good at everything but totally possible for an AI.

Reply Good karma Bad karma+1 vote
boolbada Author
boolbada

I'm aware of them. SC is easier in some sense, it is easier to determine where to expand because there's mineral there and the only good place to expand is at the center of those minerals. Then there are ramps that allow the AI to find defensive positions easier while C&Cs; series are intended to play in open place.

The problem with C&Cs; is that MCVs are the core of the gameplay and it keeps moving from place to place :)

Reply Good karma+1 vote
Templarfreak
Templarfreak

Here's how you handle the AI picking where they should expand: They find a tile with Tiberium/Ore on it and they use some kind of pathfinding algorithm to find how many other Tiberium/Ore tiles are adjacent to that one. Ones that it finds, it continues this search on until the entire field is mapped. Then it finds a spot where it can place a refinery that has as many adjacent Tiberium/Ore tiles nearby. Then it starts the actual process of expanding. You can't really go with a hard-coded system because field sizes and values can vary and that would also be considered cheating in a sense if it just automatically knows the fields on the map and their values without scouting at all.

Note that all of this should still be limited by vision. If it doesn't have an entire field revealed, that should affect it's judgement. Like perhaps it will want to scout to reveal the field to make sure how much is there, or maybe it might not consider that field to be as valuable if it doesn't see the whole field, and instead will expand elsewhere.

Reply Good karma Bad karma+1 vote
boolbada Author
boolbada

I do a similar thing but doesn't work well. First of all, there are many fields and which expansion to choose. Second, it doesn't consider terrain that it will expand behind the cliff that harvester will have to go a long way. Reality is tough :)

Reply Good karma+1 vote
Templarfreak
Templarfreak

Those are really easy things to get around... Make them pick ones with the shortest distances from all other bases they have. And the rule I suggest makes it so a cliff should never be in the way between a refinery and a field. There should never be *anything* between them that way, actually.

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.