Shard 0.4/dev
Moderators: hoijui, Moderators
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
Have you tried an unsynced version? What about integers and tables?
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
The data return paths from fudget:RecvSkirmishAIMessage (invoked by AI:CallLua*) and from AI:RecvLuaMessage (invoked by Spring.SendSkirmishAIMessage) do not work because the interface generator scripts are too primitive to handle basic C pointer-pointers. I was initially unaware of that "limitation" (not being their author) so full bidirectional AI<-->Lua communications briefly functioned as advertised (for legacy C++ AI's) until this happened and they had to be disabled. As a result only half-duplex mode is available which means you can send data from Lua to AI's (but not hear anything back) and send data from AI's to Lua (but not hear anything back), but nothing else. You must write your own syn/ack system to get around this.
All these extra layers in between engine and AI's sure are nice to maintain and extend.
All these extra layers in between engine and AI's sure are nice to maintain and extend.
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
It seems shard only has the game:SendToContent() way to interact. So even if i replace the "return" in the gadget with Spring.SendSkirmishAIMessage(...) there doesn't seem to be a way to receive the data from the AI side.
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
changing shard to support receiving strings from Spring.SendSkirmishAIMessage(...) on gadgets/widgets doesn't seem too hard.
will anyone do it?
(i didn't want to go into engine development or AI development other than using the lua that is already exposed...but..)
will anyone do it?
(i didn't want to go into engine development or AI development other than using the lua that is already exposed...but..)
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
I'm not aware of that API
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
from Kloot's post, it seems what's missing in the current shard is support for the "send data from Lua to AI".Kloot wrote:(...)
As a result only half-duplex mode is available which means you can send data from Lua to AI's (but not hear anything back) and send data from AI's to Lua (but not hear anything back), but nothing else. You must write your own syn/ack system to get around this.
(...)
my crappy knowledge of the Spring src tells me that the support for the lua part apparently shows up here (line 2737)
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
Would it be possible to make Shard able to detect idle units? Sometimes the callin gets skipped apparently (mostly for builders) and they can remain idle until my watchdog gets them. As it is not currently possible to tell if a builder is doing something or not, watchdog just checks at intervals longer than (most) build times, which means units may idle quite a bit.
"Idle units" in this context means they have no active orders, build/move/attack/etc. Something like isIdle or ordersCount in the Unit object would do.
"Idle units" in this context means they have no active orders, build/move/attack/etc. Something like isIdle or ordersCount in the Unit object would do.
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
I asked this almost exact question in http://springrts.com/phpbb/viewtopic.php?f=15&t=30864yuritch wrote:Would it be possible to make Shard able to detect idle units? Sometimes the callin gets skipped apparently (mostly for builders) and they can remain idle until my watchdog gets them. As it is not currently possible to tell if a builder is doing something or not, watchdog just checks at intervals longer than (most) build times, which means units may idle quite a bit.
"Idle units" in this context means they have no active orders, build/move/attack/etc. Something like isIdle or ordersCount in the Unit object would do.
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
It's much easier to do in gadget lua, Shard lua does not have access to all of the same data. Hence the request.
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
I would consider this a bug in the API, as pretty much all the AIs I've written rely on this event
That or there's a bug in the task manager system in the lua end where on the unit idle event it never gets back around to doing something
That or there's a bug in the task manager system in the lua end where on the unit idle event it never gets back around to doing something
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
I've been testing my shard cfg, and occasionally i get spammed with
and it doesn't recover. If i try to reload the AI it crashes.
I had this on 94.1, but still have it on one of the latest spring 95 test builds: "94.1.1-1087-gaad7847 develop".
PS: with my special sauce, shard can easily defeat RAI 1v1 and on small/medium maps even 1v2 :)
Code: Select all
Warning: AI for team 0 (ID: 0) failed handling event with topic 3, error: 102
I had this on 94.1, but still have it on one of the latest spring 95 test builds: "94.1.1-1087-gaad7847 develop".
PS: with my special sauce, shard can easily defeat RAI 1v1 and on small/medium maps even 1v2 :)
- Attachments
-
- infolog_ai_error.txt
- example of it happening
- (61.61 KiB) Downloaded 6 times
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
See this post and the one following it. Basically abma says this should be fixed in 95, if that's not the case, it should be reported.
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
so..... if i want to do minimal changes to shard src (enable spring lua --> shard lua communication) and test my builds, what's the fastest route?
What i can find here implies that i need the setup to build spring to build shard.
What i can find here implies that i need the setup to build spring to build shard.
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
Yes you'll need to build latest spring, and use it to generate the API headers and code needed to build Shard.
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
yesterday i got the stuff mentioned in the wiki for building spring, but cmake keeps complaining about boost being missing, despite me configuring the boost directory (where i unpacked the zip i got from the website) in the cmake settings.
the goal wasn't just the communication issue but also wanted to try and figure out why
keeps happening.
thinking about it, maybe most efficient approach is to just bypass the issues by converting shard to work as a lua AI.
Is there any licence problem or whatever with it?
what's the catch?
the goal wasn't just the communication issue but also wanted to try and figure out why
Code: Select all
Warning: AI for team 0 (ID: 0) failed handling event with topic 3, error: 102
thinking about it, maybe most efficient approach is to just bypass the issues by converting shard to work as a lua AI.
Is there any licence problem or whatever with it?
what's the catch?
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
because of some bug you want to switch language? wtf? also afaik some posts ago AF explained how the lua-code can be (re-) used as lua ai.raaar wrote:thinking about it, maybe most efficient approach is to just bypass the issues by converting shard to work as a lua AI.
imo your build-setup is fail. you gave way to few info to give hints what went wrong...
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
wanting to avoid the whole build-setup for spring seems reasonable to me because i only wanted to fix one or two specific issues in the first place (the AI bug may be hard to duplicate, and unfortunately always seems to lead to a crash in long games). I knew C, but never got into C++.
it seems focusing on luaing is probably a more efficient use of my time. It also allows me to be less dependent on spring releases.
it seems focusing on luaing is probably a more efficient use of my time. It also allows me to be less dependent on spring releases.
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
raaar wrote:wanting to avoid the whole build-setup for spring seems reasonable to me because i only wanted to fix one or two specific issues in the first place (the AI bug may be hard to duplicate, and unfortunately always seems to lead to a crash in long games). I knew C, but never got into C++.
it seems focusing on luaing is probably a more efficient use of my time. It also allows me to be less dependent on spring releases.
The original premise of the entire project was to be engine agnostic, so implementing as a spring gadget made no sense in that context.
Of course if the API was implemented so that it called gadget APIs then there'd be no difference, but that's work that needs doing, and I've not needed to do it, especially since it doesn't fix any problem I have at the moment, and there was always the APIs provided.
Now that it turns out those APIs don't work, some bug fixing will be necessary, perhaps you'd like to do the gadget implementation work? You'll need to implement a building placement algorithm if you do, which I've spoken about in this thread recently.
Also keep in mind that the SWIG binding generation could just as easily be told to generate bindings for another language, eg python, etc. Using lua gadgets would remove that option.
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
I made an LOS simulation in a shard config by grabbing the radii from the unidefs with a widget and saving it as a lua table. (I want an AI that doesn't cheat!) But it's only as good as it can be: not so much line of sight as circles on a grid. Is there any chance Shard will get access to Spring's LOS in the future?
Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey
My main obstacle is that the Ubuntu machine I set up to do Shard stuff on has gone and upgraded itself to Saucy Salamander 13.10 development branch, and is slowly tearing itself apart.
Think of an appropriate API for how you'd like to be able to access it though and I can look properly when I get Ubuntu 12 LTS installed
Think of an appropriate API for how you'd like to be able to access it though and I can look properly when I get Ubuntu 12 LTS installed