i doubt thatKaiserJ wrote:time spent developing EVOrts : thousands of hours
time spent developing shard : thousands of hours
time spent watching my drunken friend get beaten by shard over and over again after talking shit about how good he was going to be at a game he hadn't yet played and AI opponents in general : priceless
Shard 0.4/dev
Moderators: hoijui, Moderators
Re: Shard
-
- Posts: 3
- Joined: 10 May 2010, 07:13
Re: Shard
AF is there a source code download so I can compile on a linux system.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Shard
Shard makes me hard.
hurr hurr ;p
hurr hurr ;p
Re: Shard
http://springrts.com/phpbb/viewtopic.php?f=15&t=19583
Please modify your entry or add a new one to this thread to keep track of your current AI development.
Please modify your entry or add a new one to this thread to keep track of your current AI development.
Re: Shard
Added to game:
And the resource object in question:
Code: Select all
function GetResource(idx) -- returns a Resource object
function GetResourceCount() -- return the number of resources
function GetResource(name) -- returns a Resource object, takes the name of the resource
Code: Select all
Resource {
name,
income,
usage,
capacity, -- how much we can store (-1 for unlimited)
reserves, -- how much is stored
gameframe, -- the game frame these stats were recorded at
},
Re: Shard
http://darkstars.co.uk/2010/shard-0-25/
Ill push out 0.26 after I've gotten feedback that it works for everyone and update the first post
Ill push out 0.26 after I've gotten feedback that it works for everyone and update the first post
Re: Shard
Tried out 0.25 on Battlecity V1, it played very well on BA, except for near the end where it sent it's commander straight at a pack of 30 AKs i had protecting the centre right mexes. It had radar coverage, and had encountered that little pack before, so i'm confident it knew they were there. The opposing team had the upper hand, they were slowly pushing me and my ally back, yet it decided to do something rather silly like that.
Might this have something to do with me running the multithreaded exe? I've heard a lot of things behave oddly with it, which is a shame because I need the extra core for the game to run smoother with larger numbers of AIs.
EDIT: On CorePrime_revision1, the opposing team of Shard AIs at the bottom of the map simply built one solar collector, then sent their commanders straight towards me and my allies.
Probably not the AI's fault entirely, every AI i've tried behaves oddly on that map, which is a damn shame.
Might this have something to do with me running the multithreaded exe? I've heard a lot of things behave oddly with it, which is a shame because I need the extra core for the game to run smoother with larger numbers of AIs.
EDIT: On CorePrime_revision1, the opposing team of Shard AIs at the bottom of the map simply built one solar collector, then sent their commanders straight towards me and my allies.
Probably not the AI's fault entirely, every AI i've tried behaves oddly on that map, which is a damn shame.
Re: Shard
coreprime revision1 is a metal map no? There is a horrible flaw in krogothes metal spot detection algorithm. When I pointed it out it was ignored. Instead every single AI in this community has inherited that algorithm, and thus, that flaw.
The flaw involves scales of values. Krogothes algorithm looks and see 255 as max metal, and 0 as minimum metal. It then filters out everything below a threshold. The problem with this is that on some metal maps, areas have been added with extra metal. As a result, only these areas show up as extraction spots, and normal areas are ignored.
The fix for this, is not to base the minimum value on a value between 0-255, but on a minimum amount of actual metal extracted, in order to figure out the correct threshold to filter out. e.g. any spot which yields more than 0.6 metal.
Also Shard at the moment has no code to identify threats to the commander and retreat. Nobody has written any code for that yet.
The flaw involves scales of values. Krogothes algorithm looks and see 255 as max metal, and 0 as minimum metal. It then filters out everything below a threshold. The problem with this is that on some metal maps, areas have been added with extra metal. As a result, only these areas show up as extraction spots, and normal areas are ignored.
The fix for this, is not to base the minimum value on a value between 0-255, but on a minimum amount of actual metal extracted, in order to figure out the correct threshold to filter out. e.g. any spot which yields more than 0.6 metal.
Also Shard at the moment has no code to identify threats to the commander and retreat. Nobody has written any code for that yet.
Re: Shard
How Lua coder is supposed to make CanAttack(unit) function? Is it possible to introduce basic tags common for all mods like: mobile, static, military (has weapons), air, land, naval, underwater, amphibious etc. and use them as filters in extended versions of GetEnemies(), GetFriendlies()? That would greatly simplify coding behaviours. Hm, also unit.CanReach(position) is important function which is absent.
Is it normal in Lua?
attackerlist is a hash table. Why not to access a reversed table (keys <=> values) or specify another standard of describing attackerlist.lua, so unit names are keys? Searching would be much faster and as i understand IsAttacker() can be called too often. Also you will automatically kill unnecessary duplicates in attackerlist.
Is it normal in Lua?
Code: Select all
function IsAttacker(unit)
for i,name in ipairs(attackerlist) do
if name == unit:Internal():Name() then
return true
end
end
return false
end
Re: Shard
Each time I play this with CA or Evo I crash. So i picked this out of the infolog:
Code: Select all
[ 0] <SkirmishAI: Shard (team 1)>: ...ring\AI\Skirmish\Shard\0.25\ai\EvoRTS\behaviours.lua:1: attempt to index global 'ai' (a nil value)
stack traceback:
[C]: ?
[C]: ?
...ring\AI\Skirmish\Shard\0.25\ai\EvoRTS\behaviours.lua:1: in main chunk
[C]: in function 'require'
...pring\AI\Skirmish\Shard\0.25\ai\behaviourfactory.lua:3: in main chunk
[C]: in function 'require'
D:\Spring\AI\Skirmish\Shard\0.25\ai\ai.lua:4: in main chunk
[ 0] SkirmishAI (with team ID = 1): Cheating enabled!
[ 0] ResourceMapAnalyzer by Krogothe, initialized for resource 0(Metal)
Re: Shard
I dont have much time on here.
Because attackers.lua is obsoleted by not bothering and instead defining AttackerBehaviour in the behaviours.lua, a change I will be enforcing sooner rather than later, and a far more optimal and consistent mechanism if I do say.
I'll also look into the CA/Evo problems when I get back home later this week.
Also, Im aware there are things that could be useful in the API but havent been added yet, I'm adding things as I go along, and there are things I plan to add soon I just haven't gotten around to, such as changing retrieval of spots to use the tables like I did with enemies, and adding support for retrieving a units resource usage/generation, for which the code in the binary is half written, hence why the callbacks where not added or documented in the 0.25 release in the ResourceUsage object.
Because attackers.lua is obsoleted by not bothering and instead defining AttackerBehaviour in the behaviours.lua, a change I will be enforcing sooner rather than later, and a far more optimal and consistent mechanism if I do say.
I'll also look into the CA/Evo problems when I get back home later this week.
Also, Im aware there are things that could be useful in the API but havent been added yet, I'm adding things as I go along, and there are things I plan to add soon I just haven't gotten around to, such as changing retrieval of spots to use the tables like I did with enemies, and adding support for retrieving a units resource usage/generation, for which the code in the binary is half written, hence why the callbacks where not added or documented in the 0.25 release in the ResourceUsage object.
Re: Shard
I have the same problem when trying to run it on EvoRTS 440. And I wan't to run Shard against Al Ice and see how it goes! :DSkyStar wrote:Each time I play this with CA or Evo I crash. So i picked this out of the infolog:
Code: Select all
[ 0] <SkirmishAI: Shard (team 1)>: ...ring\AI\Skirmish\Shard\0.25\ai\EvoRTS\behaviours.lua:1: attempt to index global 'ai' (a nil value) stack traceback: [C]: ? [C]: ? ...ring\AI\Skirmish\Shard\0.25\ai\EvoRTS\behaviours.lua:1: in main chunk [C]: in function 'require' ...pring\AI\Skirmish\Shard\0.25\ai\behaviourfactory.lua:3: in main chunk [C]: in function 'require' D:\Spring\AI\Skirmish\Shard\0.25\ai\ai.lua:4: in main chunk [ 0] SkirmishAI (with team ID = 1): Cheating enabled! [ 0] ResourceMapAnalyzer by Krogothe, initialized for resource 0(Metal)
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Shard
Same issues here
Re: Shard
It is fixed in my personal builds. Overrides in CA and EvoRTS still used the old mechanism of ai:ExecuteGameFile() to load other lua files, which didn't work because they were themselves loaded using the lua 'require' method.
Replacing the lines fixed it.
Replacing the lines fixed it.
Re: Shard
Considering the dev meeting minutes thread, whatever happens, future updates can always be found at my site http://www.darkstars.co.uk either in the Shard category or on the frontpage
http://darkstars.co.uk/blog/category/ai/shard/
Blogposts about Shard are also redistributed on http://www.evolutionrts.info and http://www.springinfo.info
http://darkstars.co.uk/blog/category/ai/shard/
Blogposts about Shard are also redistributed on http://www.evolutionrts.info and http://www.springinfo.info