Page 1 of 1

[MERGED] New AI ability: Bot Call! + Bots revamp!

Posted: Wed May 14, 2014 4:41 am
by Gun Hog
This is an idea I have had for a while now - giving the AI the ability to control bots!

The biggest flaw of all bots are that they are never where they are needed most! A Roboticist cannot take his floorbot into a bombed out hole!
So, why not give the station's computer the ability to control where the robots go? Using it would be simple! Give the AI a verb to bring up a panel listing the station's bots, and remotely call them to a place the AI designates!

The benefits of such an idea would include:
- Floorbots can reach and repair hull damage with no risk to humans.
- Clean bots can be directed to the messiest areas of the station.
- Medibots can be sent to treat patients.
- ED-209s and Securitrons can be sent to deal with perps!
- MULEs can be sent to...well...run over people.
- It helps to give AIs something to do during boring, low-population Changeling rounds.

UI improvement!
- Bots now use the nicer looking dark UI!

Floorbots improved!
- "Replace Tiles" function now places tiles on floors that are missing them.
- They can now be configured to repair damaged tiles.
- BRIDGE MODE IS BACK, BABY!

Medibot changes
- Medibots now respond to patients in critical with inaprovaline instead of tricord. Intended to help stabilize a patient in critical until someone arrives to help. (Good luck!)

Patrol code has been centralized!
- The Medibot and floorbot are now able to patrol! Enable it through their settings menu, appropriate access required.

PDA summoning for more bots!
- Engineers get floorbots.
- Doctors get Medibots.
- Janitors get cleanbots.
- ED-209s added to security PDAs.

Intended bot behavior
The priority of bot operation is intended to be AI waypoints > Target (Dirt for a cleanbot, criminals for Beepsky) > PDA summons > Patrol route. Each bot is an independent machine that can be directed by the station's main computer (The AI), which is the entity that can best manage them effectively. If the bot is not currently performing a task, it can be summoned by PDA as well, however you must have access to the area you wish the bot to access. When summoned, the bot will attempt to download the user's access data based on the ID stored within the PDA. If the user does not have an ID inside the PDA, the bot will use its own access instead.. If the AI calls it, the bot will always be given all-access.

This is the interface here:
Screenshot 2014-06-26 10.18.10.png
MERGED PR here: https://github.com/NTStation/NTstation13/pull/648

On my TODO list so far:
- Have a switch for bots to disable remote interaction with the AI. Done!
*Silicons do not see it, and it will not work if a silicon hacked it or if a human emagged it.

- A refresh button for the interface. Done!
- Allow other bot types to be summoned. Medibots for Doctors, Cleanbots for the janitor, and Floorbots for Engineers. Done!
- Tell the AI player when AStar cannot calculate a path. Done!
- Find a way to deal with obstacles and odd things such as someone turning the bot off, dragging it away, then trying to get it to perform its function again. Done!
The bot will simply give up if it gets moved away, and shutting it down resets the call entirely.
- Give the bot all-access during the time it is responding to the AI's call command. Done!
- Think of a way to report to the AI when the bot has reached its destination. Done!

On my wish list:
- Have a waypoint marker visible only to the AI

Re: [POLL] New AI ability: Bot Call!

Posted: Wed May 14, 2014 8:24 am
by Stickymayhem
What a simple, ingenious and elegant idea.

This is beautiful as a way to prevent harm IC, give an AI more harmless but useful things to micromanage, and a reason for robotocists to mass produce the suckers.

Nice one. I look forward to using this.

Re: [POLL] New AI ability: Bot Call!

Posted: Wed May 14, 2014 11:24 am
by peoplearestrange
Nice. Good work!

Re: [POLL] New AI ability: Bot Call!

Posted: Wed May 14, 2014 12:11 pm
by Skorvold
Way too OP.

Edit: Last thing I want to deal with ICly is an AI playing fucking cop, whether it's too prevent harm or not, this on a HoPcurity level of bad from my perspective. Can't wait to spend my tator rounds cutting cameras.

Re: [POLL] New AI ability: Bot Call!

Posted: Wed May 14, 2014 12:17 pm
by AseaHeru
((It could also be used against security. Subvert the AI, have it call all the securibots, emag them and have them let loose...))

Re: [POLL] New AI ability: Bot Call!

Posted: Wed May 14, 2014 2:25 pm
by Remie Richards
How does it order the Bot's around? I'd like to see the code, considering the current issue with Beepsky and other Bots Path-finding code causing lag, It'd be bad to increase the amount of that type of Path-finding if it does use the same system.

Re: [POLL] New AI ability: Bot Call!

Posted: Wed May 14, 2014 2:33 pm
by AseaHeru
Probably the same way that sec can call secbots.

Re: [POLL] New AI ability: Bot Call!

Posted: Wed May 14, 2014 5:42 pm
by Gun Hog
The code is absolutely horrid, which is why I have not posted it to my github. I will leave it up for you to view if you like. Just have plenty of buckets. It is quite terrible code.
https://github.com/GunHog/-tg-station/c ... Call_Alpha

I did not use the radio code as not all bots supported it, also because I did not understand it well enough to use it. My method is more direct (and "hacky"), calculate the path once, then have the bots step through it.

I do not plan to PR this any time soon, of course.

Re: [POLL] New AI ability: Bot Call!

Posted: Wed May 14, 2014 6:37 pm
by Remie Richards

Code: Select all

B.called = AStar(B.loc, end_loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance_cardinal, 0, 255, id=B.botcard)
src << "[B] - CALLED - [src.waypoint.x],[src.waypoint.y]"
AStar is the Proc causing all the Bot lag, using it ONCE doesn't seem to bad, but if you have multiple bots all doing it at once, I could see it stacking up.

Re: [POLL] New AI ability: Bot Call!

Posted: Wed May 14, 2014 7:24 pm
by Gun Hog
Remie Richards wrote:

Code: Select all

B.called = AStar(B.loc, end_loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance_cardinal, 0, 255, id=B.botcard)
src << "[B] - CALLED - [src.waypoint.x],[src.waypoint.y]"
AStar is the Proc causing all the Bot lag, using it ONCE doesn't seem to bad, but if you have multiple bots all doing it at once, I could see it stacking up.
The call is a high priority function for all bots, most of the bots will respond on the next game tick. Until the bot exhausts its number of moves or move attempts, the bot will do nothing else. Once that happens, it resumes its normal behavior. The way the poll is going fills me with the motivation to continue with this until I can get it working well and up to standard!

The AI player itself could potentially spam calls, but it takes two clicks to do so. (Press the "Call" button, then click a spot).

EDIT: Moving my TODO list to the OP!

Re: [POLL] New AI ability: Bot Call!

Posted: Thu May 15, 2014 12:05 am
by paprika
>MULEBOTS

Yesssssss finally

Re: [POLL] New AI ability: Bot Call!

Posted: Sun May 18, 2014 6:47 am
by Gun Hog
Given that this poll is quite successful, I will keep working on this, and get help from the other coders in the PR stage (Especially getting MULEs working). Thank you for your support.

EDIT: Got MULEs working!

Re: [POLL] New AI ability: Bot Call!

Posted: Thu May 29, 2014 4:42 am
by paprika
>subvert AI
>give it 4 hacked, fast and deadly mulebots
>laugh ass off at radios

Re: [POLL] New AI ability: Bot Call!

Posted: Thu May 29, 2014 4:49 pm
by Cipher3
paprika wrote:>subvert AI
>give it 4 hacked, fast and deadly mulebots
>laugh ass off at radios
So much yes.

Re: [POLL] New AI ability: Bot Call!

Posted: Fri Jun 06, 2014 11:21 pm
by Gun Hog
paprika wrote:>subvert AI
>give it 4 hacked, fast and deadly mulebots
>laugh ass off at radios
Laugh even MORE when the AI commands the MULE to PICK UP THE CORE AND DRIVE IT AROUND, CRUSHING EVERYONE IN ITS PATH.

Re: [POLL][PR] New AI ability: Bot Call!

Posted: Fri Jun 06, 2014 11:33 pm
by MrSnapwalk
Gun Hog wrote:
paprika wrote:>subvert AI
>give it 4 hacked, fast and deadly mulebots
>laugh ass off at radios
Laugh even MORE when the AI commands the MULE to PICK UP THE CORE AND DRIVE IT AROUND, CRUSHING EVERYONE IN ITS PATH.
By the way, Gun had to refactor large portions of his code in order to allow this to work. APPRECIATE HIS EFFORT, DAMN YOU!

(Also, thumbs-up from me. I may actually play AI if this gets in.)

Re: [POLL][PR] New AI ability: Bot Call!

Posted: Sat Jun 07, 2014 12:20 am
by Gun Hog
Special thanks to MrSnapwalk for helping me test! I did not even think AIs could ride MULEbots any more!

Re: [POLL][PR] New AI ability: Bot Call!

Posted: Sat Jun 07, 2014 3:42 am
by Tokiko2
Since you are already coding this, how about adding the functionality to call a mulebot to a (traitor)-item too? Fun traitoring potential, it's one of the things I always wanted.

Re: [POLL][PR] New AI ability: Bot Call!

Posted: Sat Jun 07, 2014 3:45 am
by Cipher3
Job-specific traitor item for a cargo tech to mount something on a MULE? Yes please.

Re: [POLL][PR] New AI ability: Bot Call!

Posted: Sat Jun 07, 2014 7:54 am
by miggles
MG mount for MULEs
turn MULEs into gun drones

Re: [POLL][PR] New AI ability: Bot Call!

Posted: Mon Jun 09, 2014 12:35 pm
by AseaHeru
Just an MG? Not a missile system?

Re: [POLL][PR] New AI ability: Bot Call!

Posted: Mon Jun 09, 2014 2:16 pm
by Jeb
Insert Gygax on MULE.

Re: [POLL][PR] New AI ability: Bot Call!

Posted: Tue Jun 10, 2014 10:48 pm
by Gun Hog
You are probably better off coding a new bot entirely rather than shoving things on a MULE. It would probably take a lot of work to make mobile turret bots work!

Re: [RE-POLL][PR] New AI ability: Bot Call! + Bots revamp!

Posted: Tue Jun 17, 2014 4:19 am
by Gun Hog
I updated my OP with the latest work! It has expanded beyond the previous scope of the project, so I need a re-vote! Please review the current project and provide feedback!

Re: [RE-POLL][PR] New AI ability: Bot Call! + Bots revamp!

Posted: Wed Jun 25, 2014 9:43 pm
by Incomptinence
Hey you are playing with ED-209 code?

Are you still keeping in the robocop reference that prevents them engaging people with security access?

Re: [RE-POLL][PR] New AI ability: Bot Call! + Bots revamp!

Posted: Wed Jun 25, 2014 9:47 pm
by Gun Hog
Incomptinence wrote:Hey you are playing with ED-209 code?

Are you still keeping in the robocop reference that prevents them engaging people with security access?

Code: Select all

	if((idcheck) && (allowed(perp)) && !(lasercolor))
		threatcount = 0//Corrupt cops cannot exist beep boop
I had not touched assessment code, but upon checking it, I found that little piece. It is HILARIOUS. I am not sure, a change like that should not be included in this PR though.

Re: [RE-POLL][PR] New AI ability: Bot Call! + Bots revamp!

Posted: Thu Jul 10, 2014 6:31 pm
by Mandurrrh
Gun Hog wrote:This is an idea I have had for a while now - giving the AI the ability to control bots!

The biggest flaw of all bots are that they are never where they are needed most! A Roboticist cannot take his floorbot into a bombed out hole!
So, why not give the station's computer the ability to control where the robots go? Using it would be simple! Give the AI a verb to bring up a panel listing the station's bots, and remotely call them to a place the AI designates!

The benefits of such an idea would include:
- Floorbots can reach and repair hull damage with no risk to humans.
- Clean bots can be directed to the messiest areas of the station.
- Medibots can be sent to treat patients.
- ED-209s and Securitrons can be sent to deal with perps!
- MULEs can be sent to...well...run over people.
- It helps to give AIs something to do during boring, low-population Changeling rounds.

Floorbots improved!
- "Improves Floors" function now places tiles on floors that are missing them.
- They can now be configured to repair damaged tiles.

Patrol code has been centralized!
- The Medibot and floorbot are now able to patrol! Enable it through their settings menu, appropriate access required.

PDA summoning for more bots!
- Engineers get floorbots.
- Doctors get Medibots.
- Janitors get cleanbots.
- ED-209s added to security PDAs.

Intended bot behavior
The priority of bot operation is intended to be AI waypoints > Target (Dirt for a cleanbot, criminals for Beepsky) > PDA summons > Patrol route. Each bot is an independent machine that can be directed by the station's main computer (The AI), which is the entity that can best manage them effectively. If the bot is not currently performing a task, it can be summoned by PDA as well, however you must have access to the area you wish the bot to access. When summoned, the bot will attempt to download the user's access data based on the ID stored within the PDA. If the user does not have an ID inside the PDA, the bot will use its own access instead.. If the AI calls it, the bot will always be given all-access.

This is the interface here:
Screenshot 2014-06-26 10.18.10.png
WIP PR here: https://github.com/NTStation/NTstation13/pull/648

On my TODO list so far:
- Have a switch for bots to disable remote interaction with the AI. Done!
*Silicons do not see it, and it will not work if a silicon hacked it or if a human emagged it.

- A refresh button for the interface. Done!
- Allow other bot types to be summoned. Medibots for Doctors, Cleanbots for the janitor, and Floorbots for Engineers. Done!
- Tell the AI player when AStar cannot calculate a path. Done!
- Find a way to deal with obstacles and odd things such as someone turning the bot off, dragging it away, then trying to get it to perform its function again. Done!
The bot will simply give up if it gets moved away, and shutting it down resets the call entirely.
- Give the bot all-access during the time it is responding to the AI's call command. Done!
- Think of a way to report to the AI when the bot has reached its destination. Done!

On my wish list:
- Have a waypoint marker visible only to the AI

Added to my current list of reasons why I love GunHog. I hope this means they can also emag them as malf/traitor? Because being able to slip fuckers over and over again is hilarious. Start and epidemic in medbay and everyone panics. Would be good sneaky fun to stir suspicion or full blow silicon attack!

Re: [RE-POLL][PR] New AI ability: Bot Call! + Bots revamp!

Posted: Fri Jul 11, 2014 3:17 am
by Gun Hog
Mandurrrh wrote:

Added to my current list of reasons why I love GunHog. I hope this means they can also emag them as malf/traitor? Because being able to slip fuckers over and over again is hilarious. Start and epidemic in medbay and everyone panics. Would be good sneaky fun to stir suspicion or full blow silicon attack!
You can already hack (gives emag effects, but can be toggled) bots as a borg or AI, no special antag roles required. The only thing that stops you hacking bots is your lawset! This update allows you to move them to where you want them, then hack them remotely via the "Interface" command!

Re: [MERGED] New AI ability: Bot Call! + Bots revamp!

Posted: Sun Aug 03, 2014 7:52 pm
by Gun Hog
IT IS HAPPENING :D

Re: [MERGED] New AI ability: Bot Call! + Bots revamp!

Posted: Sun Aug 03, 2014 10:56 pm
by ShizCalev
:D !

Re: [MERGED] New AI ability: Bot Call! + Bots revamp!

Posted: Fri Aug 08, 2014 8:32 pm
by Phalanx300
An excellent update, I remember suggesting this ages ago. Also another thing we need regarding bots, is to make those control panels in the hallways accesable by Roboticists. That was Roboticists can alter routes taken by robots, currently they have no acces.

Regarding other stuff the AI should be able to do:

- Control Mules, allowing it to place itself on top of a Mule for some human roadkill.
- AI control being based on the APC rather then the cameras, with the cameras only taking away vision but not that of machines (machines being always visible). However cutting the AI control wire in the APC will remove the AI's ability to interact with machines in the area.
- Malf idea should shunt to a computer, rather then a APC. Hacking now also applies to computers, rather then APCs. Having a big blue face showing up on your console as all air is being sucked away sounds fun.

Latter two being just some realism things which would increase the fun I think.

Re: [MERGED] New AI ability: Bot Call! + Bots revamp!

Posted: Fri Aug 08, 2014 8:43 pm
by Gun Hog
Phalanx300 wrote:An excellent update, I remember suggesting this ages ago. Also another thing we need regarding bots, is to make those control panels in the hallways accesable by Roboticists. That was Roboticists can alter routes taken by robots, currently they have no access. You mean the beacons? I can take a look, at least.

Regarding other stuff the AI should be able to do:

- Control Mules, allowing it to place itself on top of a Mule for some human roadkill.
AIs can do this with the help of a borg or human to hack it beforehand. Unanchor your core and have someone bring you to the station. Once the MULE can reach you, you can have it pick you up and drive you anywhere you wish! (You just have to hit the "stop" button, else it will try to unload you)
- AI control being based on the APC rather then the cameras, with the cameras only taking away vision but not that of machines (machines being always visible). However cutting the AI control wire in the APC will remove the AI's ability to interact with machines in the area.
Could be viable if there were a central panel for it and the CE to control the powernet.
- Malf idea should shunt to a computer, rather then a APC. Hacking now also applies to computers, rather then APCs. Having a big blue face showing up on your console as all air is being sucked away sounds fun.
I would totally do this if I know how; Balancing such a thing would be a nightmare, though.

Latter two being just some realism things which would increase the fun I think.

Re: [MERGED] New AI ability: Bot Call! + Bots revamp!

Posted: Fri Aug 08, 2014 8:49 pm
by Phalanx300
Thanks for the reply!

And yes I meant those beacons. I played Roboticist once spamming robots and planned to alter their pathways, only to find out I need head level clearance to alter the beacons. Which was quite disappointing as the Roboticist should be doing that.

Regarding the Mule, I envisioned a malf AI using arrow keys to ride the mule around to kill people.

As for another idea, I would love if AI's would be able to hack vending machines so they shoot stuff at people. Kinda trivial but very fitting.

Re: [MERGED] New AI ability: Bot Call! + Bots revamp!

Posted: Fri Aug 08, 2014 9:02 pm
by Gun Hog
I will be giving Roboticists more bot access (medibot, cleanbot, floorbot) as well as access to the beacons. That is something easy and that I can do right now. As for controlling MULES with arrow controls..too much work for something that will probably only ever happen a few items. Bots cannot even reach the satellite without help. As for hacking machines, as a Malf AI, you can make them rise up and attack people! It is hard to justify a non-malf AI doing that though, as vending machines normally do not like to interface with AIs!

https://github.com/NTStation/NTstation13/pull/915 For details!

Re: [MERGED] New AI ability: Bot Call! + Bots revamp!

Posted: Fri Aug 08, 2014 9:36 pm
by Phalanx300
Great, thank you! Though does this mean the Roboticist still can't acces the other bots?

Re: [MERGED] New AI ability: Bot Call! + Bots revamp!

Posted: Fri Aug 08, 2014 10:39 pm
by Gun Hog
Phalanx300 wrote:Great, thank you! Though does this mean the Roboticist still can't acces the other bots?
I am not giving Robos access to Security robots for balance reasons, and Roboticists do not make or use MULEs, so I do not see the point in giving them access.

Re: [MERGED] New AI ability: Bot Call! + Bots revamp!

Posted: Sat Aug 09, 2014 11:50 am
by Stickymayhem
Is a /tg/station merge being planned?

Re: [MERGED] New AI ability: Bot Call! + Bots revamp!

Posted: Sat Aug 09, 2014 7:18 pm
by Gun Hog
Stickymayhem wrote:Is a /tg/station merge being planned?
Unlikely. Our code differs quite a bit now, so I would have to do a line-by-line edit to ensure everything works as expected. I do not mind doing that, however...I do not believe that I have a very good chance of getting a merge; I was told that I would have to do a complete rework of bots rather than 'moving code around'. Given that, I am not willing to waste a week or more of my time working on something that is ultimately going to get shot down.

Now, if I had a good chance of getting it in, I would do all the work I needed to do to get it ready and keep it bug-free, and also fix anything that comes up afterward - but I need to know if this is a feature that coderbus wants. I would be much more confident in committing fully to creating a /tg/ version if I had the go-ahead first.

That being said, if anyone wanted to port it themselves, I would be more than happy to help out.

Re: [MERGED] New AI ability: Bot Call! + Bots revamp!

Posted: Sat Aug 09, 2014 8:37 pm
by ShizCalev
Oh fuck, this is NTStation's area.


I'm sad now. This whole separation thing is really silly. Wish TG got this as well. :[