Advice sought: batched external control of ~24 aircraft for multi-agent RL and human-in-the-loop research #300
Replies: 1 comment
|
Thank you for the detailed description and apologies for the later response. One Python process, one multiplexed gRPC channel, one 1. Eval lifetimeMission That state lasts only for the current mission. On mission termination DCS-gRPC stops, and a reload creates a new mission Lua environment. With 2. Eval plus a resident adapterFor a closed, version-locked research prototype, this is a reasonable interim solution. The request is just a Lua string and the response a JSON string in DCS-gRPC defines no project specific message size contract only ordinary Tonic/gRPC limits apply. Your record intent batch should be far below them. The practical limit is instead how much Lua and Controller work is performed synchronously on the simulation thread. Normal MSE sanitization remains in effect: 3. Retasking every 1–2 secondsEvaluate the policy every second, but do not call I just wouldn't consider this part of the experiment at all. Typically speaking I do not like interfering with AI at all when its engaged in a 'terminal' behavior or you risk getting unexpected results. 4. One aircraft per groupOne-aircraft groups are not strictly required. Aircraft units can have individual Controllers, unlike ground and naval units where control is only group-oriented. However, groups of aircraft will engage in tactics that might be unpredictable and hard to account for. I would lead with the recommendation of 1 aircraft per group. 5. Expected scaleThe proposed load is modest. One gRPC channel is fine. dcs-gRPC will limit to 600 MSE calls per second, I would try to aim for a load of under 200, or even less, to guarantee no stuttering or issues. The likely bottlenecks are DCS AI sensing/weapon simulation and AI/Controller task churn, not protobuf or network framing. I will say, people have a tendency in DCS to do a variety of n * m comparisons, where each comparison requires multiple calls to the MSE API. Avoid that if you care about performance, things snowball very quickly in DCS. 6. Dedicated Server and human clientsThere is no documented incompatibility with connected human clients. DCS-gRPC explicitly supports Dedicated Server installation and having humans connected is definitely a requirement of DCS-gRPC to be useful to the community. The required 7. Three-sided engagementNeutral groups are visible and controllable from mission Lua, and DCS-gRPC’s unit enumeration includes Blue, Red, and Neutral. The coalition API exposes all three. However, Neutral is not a third mutually hostile coalition. DCS’s native AI hostility, IFF, detection, datalink, threat reaction, and coalition scoring fundamentally model Red versus Blue, with Neutral outside that hostility relationship. Explicit same-coalition Therefore:
8. Combat events
Known complications include:
The June 2026 DCS changelog still described a “potential fix” for missing HIT/KILL events during kill trades, which is good evidence that exactly-once assumptions remain unsafe. See DCS 2.9.27.24969. 9. Mission loading and reloads
Expect current streams to terminate with EOF or an unavailable transport. You should reconnect with a backoff. Clients should remain connected during a mission load. 10. Versioning and contributionThere is no maintained public DCS-to-DCS-gRPC compatibility matrix from which to name an authoritative “best known-good” pair. As far as I know dcs-grpc is completely compatible with the current version of DCS unless it's something mentioned in Issues, which might also be the case for an older game version. Contributions are generally welcome. Literal typed Controller RPCs whose semantics match DCS Opening a design issue before implementation would let us settle whether we prefer ED API parity, the higher-level intent service, or both and what adding them might impact in the project. A reproducible benchmark mission and demonstration of the intent service might be most useful in that. |
Uh oh!
There was an error while loading. Please reload this page.
Hi, and thank you for maintaining DCS-gRPC.
We are a university research group building a multi-agent RL and human-in-the-loop prototype. External Python policies would provide tactical intent to DCS AI aircraft every 1–2 seconds:
Our target scenario is two externally controlled flights of eight aircraft each, plus up to eight human-operated or normally AI-controlled aircraft on a DCS Dedicated Server.
We plan to use one Python process and one gRPC channel, not one DCS client per AI aircraft. Since the full Controller task API does not appear to be exposed as typed RPCs in the current public proto, our proposed interim design is:
Eval;The installation would be offline and version-locked.
Before committing to this architecture, could you advise on the following?
Eval and task control
Does Lua state created through
Evalpersist for the lifetime of the mission? What happens after mission reload or restart?Is
Evalplus a restricted resident Lua adapter a reasonable interim approach forsetTask,pushTaskandsetOptioncontrol? Are there payload-size, serialization or sandbox limitations we should know about?Would updating trajectory intent every 1–2 seconds interfere with DCS AI attack, weapon-employment or threat-reaction logic? Is it preferable to evaluate every second but only replace tasks when heading, altitude, target or engagement mode changes significantly?
For independent control of each aircraft, is one single-aircraft DCS group per aircraft the recommended arrangement?
Scale and multiplayer
Evalcall per second;StreamUnitsat about 1 Hz for 24–32 aircraft;StreamEventssubscription.At this scale, is the likely bottleneck gRPC/Lua processing, repeated Controller task changes, or DCS AI/sensor/weapon simulation? Is there a recommended
StreamUnitsinterval or useful server-side performance metric?MissionScripting.lua?Three-sided engagement
AttackUnitor similar tasks?Are neutral groups visible and controllable through DCS-gRPC and
Eval, or is a true three-way mutually hostile engagement impossible at the DCS engine level?Events and mission lifecycle
In dedicated-server AI combat, are
S_EVENT_SHOT,HIT,KILLandUNIT_LOSTgenerally reliable enough to use as the primary source for scoring and analytics?Are
loadMissionandreloadCurrentMissionreliable for automated batch runs? What happens to existing gRPC streams and clients after a mission reload withautostart = true?Versioning and contribution
Would contributions toward a typed, batched aircraft-intent or Controller service be welcome? If the prototype succeeds, we would be happy to contribute reusable parts and share performance benchmarks from the 16v16 tests.
Thank you. We would also be glad to share our findings with the project.
All reactions