Shard 0.4/dev - Page 2

Shard 0.4/dev

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: Shard

Post by 1v0ry_k1ng »

KaiserJ wrote:also i really have to stress that only noobs wait until they have 10 units before attacking; i would rather your AI played all-out balls-to-the-wall style games.
bear in mind that unless the AI can micro, attacking with small groups is entirely ineffective.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard

Post by AF »

Shard 0.1.2
  • game:FileExists() now works correctly
  • game:SendToContent(string) added, communication with lua gadgets is now possible
  • unit:MoveAndFire() added
  • unit:Build now returns a boolean success if true, failure if false
  • Taskqueue behaviour bugs squished with some idle builders
  • A task queue can be a function now
  • A task item in a task queue can be a function now
  • Units can no longer declare themselves recruits twice, fixes a bug in attackhandler
  • Added a basic CA override set for Arm ( Thanks to General Kerr), Shard now beats RAI in CA
  • AttackerBehaviour now uses MoveAndFire instead of Move, this fixes bombers landing in enemy bases
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard

Post by AF »

An example of random task queues via a function, as well as a task queue that is executed the first time and then never executed by that unit again:

http://pastebin.com/bfZ8cKvE
Kerr
Posts: 37
Joined: 27 Feb 2010, 03:18

Re: Shard

Post by Kerr »

btw, RAI won't build anything but mex in CA, but with my task queue i made for CA, even giving RAI free entire base infrastructure (after i noticed that it was doing nothing but mex up for first 4 min... and was about to be attacked by raiders) (10 labs (and it used them) adv fusion, pylons, defenses(killed the first attack), etc... RAI still lost somehow, because it couldn't fight effectively... )

also i'm improving my taskqueue so it will utilize all factories and arty along with it so it can bust porc too...

with the changes that were made it will work much better now (yay, fight order instead of move order! maybe it'll stop landing bombers in the enemy base now rofl)

also i had set it to attack is groups of 15.

My updated taskqueue also will have the od pylon at start set properly, it now connects all 3 mex usually lol.

also it's interestign and helpful that I am able to chain factories so what is built changes to higher techs (bigger units for CA) like adding in HLT once it gets to the vehicle factory (after bot factory and air factory).

lol


*ramble*
*ramble*

Shoot Hard And Reclaim Dem!

(psst, builders need to learn how to reclaim, ATM the map is messy after a bit lol, nano utilization would be good too!)
Kerr
Posts: 37
Joined: 27 Feb 2010, 03:18

Re: Shard

Post by Kerr »

uhh, latest version has probs?

[ 397] <SkirmishAI: Shard dev (team 3)>: ...ames\Spring\AI\Skirmish\Shard\dev\ai\unithandler.lua:51: attempt to index local 'engineUnit' (a nil value)
stack traceback:
[C]: ?
[C]: ?
...ames\Spring\AI\Skirmish\Shard\dev\ai\unithandler.lua:51: in function 'AIRepresentation'
...ames\Spring\AI\Skirmish\Shard\dev\ai\unithandler.lua:35: in function 'UnitBuilt'
C:\games\Spring\AI\Skirmish\Shard\dev\ai\ai.lua:60: in function <C:\games\Spring\AI\Skirmish\Shard\dev\ai\ai.lua:57>

spamed...

those aren't files ive changed
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Shard

Post by JohannesH »

does it maphack
Kerr
Posts: 37
Joined: 27 Feb 2010, 03:18

Re: Shard

Post by Kerr »

I think it does just to determine where to attack? but im not sure...

it worked for me before...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard

Post by AF »

yes, it has a maphack it uses to figure out where to attack which can see cloaked units. It wont make much difference since shards default attack handler is setup to target the map cell with the lowest number of units, and shards routines only use the maphack for the attack group targetting routine
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Shard

Post by hoijui »

in other words, it only knows about clocked units in a global scale, but will not hunt them one by one?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard

Post by AF »

indeed
Kerr
Posts: 37
Joined: 27 Feb 2010, 03:18

Re: Shard

Post by Kerr »

bugs:

AttackAndMove

seems to not like you, i changed it back to just "Move" in my CA overrides and am playing with the AI online right now

---------

Cloaked units (flea in CA) don't attack?

---------

The Comm keeps hanging in the build list every other game.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard

Post by AF »

How do you mean doesn't like me? More information!
Kerr
Posts: 37
Joined: 27 Feb 2010, 03:18

Re: Shard

Post by Kerr »

gives error message, EG attampt to access a nil function

i tried changing it to "Fight(p)" "AttackMove(p)" etc from the current "MoveAndAttack(p)" (or MoveAndFight(p) ?)

all said nil so i assume that the one you were using was invalid lol.

the problem is error message spam that drops my FPS to 2, and the AI won't attack anything.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard

Post by AF »

I will investigate this, I am intending to make an update 0.1.4 within a few hours
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard

Post by AF »

Yeah Its MoveAndFire but the code uses MoveAndAttack hence the error.

I'm looking into something with a new EvoRTS setup at the moment,
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard

Post by AF »

NTai Kernel Panic config ported over, tested with 2 Shards in KP 3.6
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: Shard

Post by Licho »

You could include auto-micro widgets from CA into it perhaps.
AutoSkirm and AutoRaider.
AutoSkirm is for skirmishers, when they have fight command they try to stay at max range from attacked unit.

AutoRaider is for fast raiders, when they have fight command, they approach slow firing enemy using zig-zag movement to avoid bullets. They also used to do circles around enemy but thats now disabled.
==Troy==
Posts: 376
Joined: 29 Oct 2008, 15:55

Re: Shard

Post by ==Troy== »

Better make it open source. At my university the exact thing has happened as Sinbad has mentioned, the only issue is that the supervisor took ALL of the credit, and presented the work as "his project in total".

Open sourcing and releasing the work, as long as your svn is closed, and all commits are purely yours, should not affect your degree to any extent.

If you are unsure whether that will affect it or not, I recommend to either ask the head of department (as long as he is not your supervisor) or release the work immediately after you get your degree.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard

Post by AF »

Well I intend to opensource Shard on graduation day ( july 12th (also my birthday hint hint)).

I've been discussing with some people about taking lua widgets and porting them to Shards API, shouldn't take too much effort really
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: Shard

Post by 1v0ry_k1ng »

progress?
MSN MEEE
Post Reply

Return to “AI”