Use Map Settings requests

Anything related on how to build / improve your AI using BWAPI, BWTA, BWSAL, etc.
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Sun Nov 21, 2010 8:09 pm

Can you modify the spawn percentages for defilers?
krasi0
Posts: 254
Joined: Thu Dec 18, 2008 12:42 pm

Postby krasi0 » Sun Nov 21, 2010 8:18 pm

Updated Zerg perc to include defilers:
Zerg(Computer)
Ultralisk: 8
Scourge: 2
Zergling: 18
Hydralisk: 16
Mutalisk: 15
Guardian: 13
Lurker: 14
Queen: 4
Devourer: 5
Defiler: 5
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Sun Nov 21, 2010 9:40 pm

Another alpha/beta: [attachment=2791:python_T...Training.scx]
Spawns both sides, restarts the game when it has ended. Other stuff.

Todo:
Don't run suicide script unless both players are on the field. (bug that prevents the zerg from attacking you)
Base generation.

[spoiler]

Code: Select all

[Zerg(Computer)]
  Ultralisk:  8
  Scourge:   3
  Zergling:   20
  Hydralisk:  18
  Mutalisk:   15
  Guardian:   13
  Lurker:    14
  Queen:     4
  Devourers:  5
            
Total number of units: rand between 5 and 50

[Terran(Player)]
  Marine:       11
  Medic:        3
  Ghost:        5
  Vulture:      20
  Goliath:      25
  Tank:         15
  Wraith:       6
  Valkyrie:      5
  Sciencevessel:  7
  Battlecruiser:  3
               
Total number of units: rand between 3 and 40


// Wraith +50        p2
// Wraith Cloak      p3

// Medic +50         p2
// Optical Flare      p3
// Restoration       p4

// Goliath Range      p2

// Battlecruiser +50   p2
// Yamato Gun        p3

// Vulture Speed      p2
// Spider Mines      p3

// Ghost +50         p2
// Ghost Sight       p3
// Personnel Cloaking  p4

// Science Vessel +50  p2
// EMP Shockwave      p3
// Irradiate         p4

// Marine Range      p2
// Stim Packs        p3
[/spoiler]
DeathEagle
Posts: 10
Joined: Wed Sep 08, 2010 4:58 pm

Postby DeathEagle » Thu Nov 25, 2010 8:41 am

Hi Heinermann

I'm trying to use Evolutionary Computation to optimize some values for my bot.

I have a little request. Could you help me with inserting a Trigger into the uploaded map file, so it restarts the position and health/hitpoints of all units when one of the teams has zero units left.
Of course I can just use the BWAPI.ini file to do it, but I would be faster in this way.
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Fri Nov 26, 2010 4:58 am

How is this?
  • Respawns the units when a match has ended. (Or at the beginning of the map, making it easier to modify without having to preplace any units)
  • Shows a Win(Minerals) Loss(Gas) leaderboard.
  • Waits 1000ms before restarting the match to give a little time for the module to identify the end of the match (just verify the resource count difference for win/loss, can check kills/deaths difference for fitness).
  • AI no longer runs a Suicide Mission AI Script, instead does a persistent patrol to your location (this is to avoid a bug with multiple AI Script calls that prevented the computer from moving after a single round, the difficulty may or may not have changed a little since this alteration).
[attachment=2794:GoliathsZerglings.scm]

You sure you don't want anything else? Randomize starting position (between the two)? Random spawn counts?

Also I've played it a few times and as long as you micro the Goliaths correctly you will win 100% and can keep all Goliaths above 75% HP. Attack move and holding position will result in a loss, which is desired.
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Fri Nov 26, 2010 8:49 pm

Here's a random map I made. It's a one-time run.

You dodge yamatos by loading your transports.
No victory/loss conditions.

[attachment=2796:yamatododge.scm]

When the Battlecruiser starts the animation, immediately loading and unloading from a shuttle will clear the Battlecruiser's target.
In a real game the Battlecruiser will lose all its energy and the target will have been completely safe, the target will be able to move after unloading while the Battlecruiser is still in its animation. You can dodge other abilities this same way, like Broodling for example. You can also still dodge it when the bullet is moving towards the unit (works for dodging some attacks as well).

The theory was to keep a dropship/shuttle/overlord by important units so that you can dodge attacks frequently. Bunkers would also work if they are nearby (for terran organic units). Possibly an application that an AI could pull off easily.
TheBlueGnu
Posts: 27
Joined: Fri May 20, 2011 12:34 pm

Postby TheBlueGnu » Mon Jul 25, 2011 5:39 am

Anyone have genetic algorithm code for C++? I'd love to have a walk through for combining speed hacks, menu automation, file/database reading and writing and a simple algorithm which includes fitness functions, crossover, mutation and making new generations till a specified number of generations.

I've looked at done a bit of the speed hacks post, and will attempt menu automation as well, but the reading to and from a text file post seemed a bit too simple for something where I'm evolving populations of rules.

Return to “AI development (BWAPI Bots)”

Who is online

Users browsing this forum: No registered users and 1 guest