Standard chat protocol for AIs?
Standard chat protocol for AIs?
We will now hopefully have many AIs with chat capabilities, so probably it's a good idea to make a single standard of how should they interact with each other via chat messages.
For instance, i've just made NullBot aware that Nexus AI reacts on "help me!!" private message with a beacon. It also says something longer, like "Could use some help here!", when talking to humans. If there is another AI around, NullBot should learn his language as well to properly interact. Even though it's possible to figure out what AI we're talking to (via playerData array lookup), it would be easier if all AIs obeyed a certain single protocol, and i'm proposing to somehow define one in this thread.
While not yet having anything in particular in my mind, i could say that probably we, first of all, need a way to distinguish between universally accepted commands and commands that make sense only for a specific AI. For example, commands like "!help", "!go", etc., could be forced upon all AIs, while commands like "!nb res machineguns", "!nb who", etc., could be made nullbot-specific.
For instance, i've just made NullBot aware that Nexus AI reacts on "help me!!" private message with a beacon. It also says something longer, like "Could use some help here!", when talking to humans. If there is another AI around, NullBot should learn his language as well to properly interact. Even though it's possible to figure out what AI we're talking to (via playerData array lookup), it would be easier if all AIs obeyed a certain single protocol, and i'm proposing to somehow define one in this thread.
While not yet having anything in particular in my mind, i could say that probably we, first of all, need a way to distinguish between universally accepted commands and commands that make sense only for a specific AI. For example, commands like "!help", "!go", etc., could be forced upon all AIs, while commands like "!nb res machineguns", "!nb who", etc., could be made nullbot-specific.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Standard chat protocol for AIs?
Please wright a communicate language for NullBot.
"My IRC en multiplay naam is Andrie"
Groete Andrie
Groete Andrie
- Shadow Wolf TJC
- Regular
- Posts: 1047
- Joined: 16 Apr 2011, 05:12
- Location: Raleigh, NC
Re: Standard chat protocol for AIs?
What AIs say to human players doesn't need to be uniform or standard, but communication between AIs should probably be private, uniform, and simple indeed (though doesn't need to be comprehensible to humans). For example, while I could program ShadowBot to say "I could use some help over here!" to all of its allies, it wouldn't have any effect on how other AIs behave, and would just be flavor text. On the other hand, I could have ShadowBot send private messages to other AIs, and these messages would probably be short, generic ones such as:
- "!help": order other AIs to destroy enemy units assaulting the AI's base.
- "!attackHere": order other AIs to perform an assault maneuver on beacon location.
- "!attackTarget" + target.id: order other AIs to take out designated target id.
- "!defendHere": order other AIs to send droids to defend the area, possibly even build an outpost and/or defenses there.
- "!rallyHere": order other AIs to send droids to a location in preparation for a coordinated assault.
- "!askIfReady": ask the other AIs if they're in position to carry out the operation.
- "!waitForMe": inform other AIs that the AI needs more time before it can carry out the operation.
- "!ready": inform other AIs that it's ready to carry out the operation.
- "!needTruck": ask other AIs for a truck.
- "!needPower": ask other AIs for more power.
- "!no": tell the other AIs that it refuses to comply with the order.
...and possibly more.
Since they're private, they would not be seen by human players.
By the way, it wouldn't hurt to have a .js file that all AIs would access, that would contain a list of messages, that human players would probably say to its allies, to watch for and respond to. Since this game is played in multiple languages, such as Spanish, French, Russian, Brazilian, etc., the list would probably need to be multilingual since I believe that players using different language versions may play with eachother, alongside some AI allies.
- "!help": order other AIs to destroy enemy units assaulting the AI's base.
- "!attackHere": order other AIs to perform an assault maneuver on beacon location.
- "!attackTarget" + target.id: order other AIs to take out designated target id.
- "!defendHere": order other AIs to send droids to defend the area, possibly even build an outpost and/or defenses there.
- "!rallyHere": order other AIs to send droids to a location in preparation for a coordinated assault.
- "!askIfReady": ask the other AIs if they're in position to carry out the operation.
- "!waitForMe": inform other AIs that the AI needs more time before it can carry out the operation.
- "!ready": inform other AIs that it's ready to carry out the operation.
- "!needTruck": ask other AIs for a truck.
- "!needPower": ask other AIs for more power.
- "!no": tell the other AIs that it refuses to comply with the order.
...and possibly more.
Since they're private, they would not be seen by human players.
By the way, it wouldn't hurt to have a .js file that all AIs would access, that would contain a list of messages, that human players would probably say to its allies, to watch for and respond to. Since this game is played in multiple languages, such as Spanish, French, Russian, Brazilian, etc., the list would probably need to be multilingual since I believe that players using different language versions may play with eachother, alongside some AI allies.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Re: Standard chat protocol for AIs?
I like the idea of simple messages, but wonder if they will be extensible in the future? In particular, we need a reliable way to pass JS API objects around via chat, also something that's extensible for more complex things we might want to do in future. Maybe we could use JSON (provided by the JS environment used in WZ JS API) for messages?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: Standard chat protocol for AIs?
I think there should always be an AI id after the "!" to make coding easier. That way you always know the message is immediately after the first space, and what's before the first space is AI id.
For standard vocabulary, maybe we have "!ai" prefix?
For standard vocabulary, maybe we have "!ai" prefix?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: Standard chat protocol for AIs?
This could be nice, but i feel sometimes players will get annoyed to type even one extra letter. I even feel like omitting the ! sign completely (since it's pretty hard to type on your normal keyboard). For the same reason, i'd rather not use capital letters and rather make it all case-insensitive.I think there should always be an AI id after the "!" to make coding easier.
P.S. This is all concerning commands that are designed to be issuable both by humans and by other AIs. If we want some commands to be only used for inter-AI communications, then, of course, they need to be as long as complicated as possible
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Standard chat protocol for AIs?
how do you tell which ai to do what?
Re: Standard chat protocol for AIs?
With private messages?
The AI won't react on what it doesn't hear (obvious).
Code: Select all
1!get over there
2!make love not war
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Standard chat protocol for AIs?
For messages that players send, I agree it needs to be super short messages. But I think we shouldn't let that limit what AI's can send to other AIs - so maybe two formats of message, one for human interaction, one for AI-to-AI interaction?
On the AI-to-AI interaction front, where we could benefit from sending data objects with messages, I've written a quick API to help with sending messages between AIs...
https://warzone.atlassian.net/wiki/disp ... /Babel+API
Used as a black box, it helps compile/decompile enhanced chat messages that can include: message, dialect ("nb", "cb", etc), and data too Intelligently handles transfer of game objects via chat(), as well as all other types of JS API object and any custom JS objects, arrays, strings, numbers, booleans, etc. It lets you handle different dialects in a nice way.
Hoping to get it up to github later today once I've completed unit testing it (ie. debugged it). Oh, and it also runs on WZ 3.1 (obviously chat messages don't get sent, but means it can safely be used in current AI scripts).
BTW, is there a guide to using in-game chat anywhere? I was looking for one the other day but couldn't find anything. From what I understand starting a message with a "." will only send to allies, starting with a number will only send to specific player -- is that correct? are there others?
On the AI-to-AI interaction front, where we could benefit from sending data objects with messages, I've written a quick API to help with sending messages between AIs...
https://warzone.atlassian.net/wiki/disp ... /Babel+API
Used as a black box, it helps compile/decompile enhanced chat messages that can include: message, dialect ("nb", "cb", etc), and data too Intelligently handles transfer of game objects via chat(), as well as all other types of JS API object and any custom JS objects, arrays, strings, numbers, booleans, etc. It lets you handle different dialects in a nice way.
Hoping to get it up to github later today once I've completed unit testing it (ie. debugged it). Oh, and it also runs on WZ 3.1 (obviously chat messages don't get sent, but means it can safely be used in current AI scripts).
BTW, is there a guide to using in-game chat anywhere? I was looking for one the other day but couldn't find anything. From what I understand starting a message with a "." will only send to allies, starting with a number will only send to specific player -- is that correct? are there others?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: Standard chat protocol for AIs?
There's the @ symbol as well, i think we just discussed it. There's also client list menu with channel buttons to enable or disable specific players.aubergine wrote:BTW, is there a guide to using in-game chat anywhere? I was looking for one the other day but couldn't find anything. From what I understand starting a message with a "." will only send to allies, starting with a number will only send to specific player -- is that correct? are there others?
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: Standard chat protocol for AIs?
NRS AI
-Help
-i'm ok
-ally me
-"truck ?"
-"power ?"
It also drop beacon on a group of enemies bigger than his own. Sometime asking for ally to intercept it.
-Help
-i'm ok
-ally me
-"truck ?"
-"power ?"
It also drop beacon on a group of enemies bigger than his own. Sometime asking for ally to intercept it.
Heretic 2.3 improver and proud of it.
Re: Standard chat protocol for AIs?
Added new article to wzpedia: https://warzone.atlassian.net/wiki/disp ... +Transfers
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: Standard chat protocol for AIs?
Babel API released: https://github.com/aubergine10/EggPlant ... s/Babel.js
Docs: https://warzone.atlassian.net/wiki/disp ... /Babel+API
Docs: https://warzone.atlassian.net/wiki/disp ... /Babel+API
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: Standard chat protocol for AIs?
I often play some sort of a robot war using the cheat mode and autogame on. When my Nexus AI calles "help me!" the allied NullBot never does. :-/
Re: Standard chat protocol for AIs?
Since v2.0, on git master, it should (?)
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam