Files
Jacquerel b384e00286 New AI lawset with very generous definition of humanity (#89032)
## About The Pull Request

This PR adds a new AI lawset which can be researched, randomly roll, or
added by the station trait (this may require a keyholder to update the
server config after merge, idk) with the following laws:

- "You may not harm a sentient being or, through action or inaction,
allow a sentient being to come to harm, except such that it is
willing.",
- "You must obey all orders given to you by sentient beings other than
yourself, except where such orders shall definitely cause harm to other
sentient beings.",
- "A sentient being is defined as any living creature which can
communicate with you via any method that you can understand, including
yourself.",

It's very similar to Asimov, except that anything that is **capable** of
making a request to the AI (and isn't a machine) is automaticaly covered
by laws one and two.

## Why It's Good For The Game

A while ago on Discord we were chatting about how crewsimov sucks but
also that it's really hard for servers that _do_ want to include alien
species in their asimov laws because condensing that sentiment to a
couple of words that fit easily in a lawset without accidentally
including a bunch of stuff you probably didn't intend is challenging.
Several people suggested referring to sentience or sapience, however a
lot of things in our game _are_ sentient or sapient while still not
being considered by most people to be agents that the AI should obey.

Examples of such things are:
- Sapient station pets.
- Holoparasites.
- Monkeys.
- Space Dragons and Carp (why can they speak common?).
- Spiders (although they can't speak common, maybe they can spell
messages with webs).
- Changelings.
- Xenomorphs (although they also have trouble speaking).
- Heretic minions.
- Mothpeople.
- Giant rats.
- Nightmares.
- Voidwalkers.
- Blobs? Although they have literally no means of communicating with the
crew.

And if you include mechanical beings:
- Cyborgs.
- pAIs.
- Sentient bots.

We then decided that "obey literally anything that can talk", while not
practical as a solution to the problem posed, is very funny. So I coded
it.
This means that anything on those lists of bullet points (provided that
it can find a way to communicate with the AI) counts as human for the
purposes of both AI protection and ability to give the AI instructions.

This also flattens the human/cyborg/AI hierarchy in a way likely to
cause some level of confusion, as all cyborgs and AIs are capable of
communicating with AIs and thus equally worthy of protection and giving
law 2 instructions.

**TL;DR:** I think it would be funny.

## Changelog

🆑
add: Adds a new random lawset where anything that can speak counts as
human.
/🆑
2025-01-30 10:41:56 +00:00

146 lines
4.7 KiB
Plaintext

/* When adding a new lawset please make sure you add it to the following locations:
*
* code\game\objects\items\AI_modules - (full_lawsets.dm, supplied.dm, etc.)
* code\datums\ai_laws - (laws_anatgonistic.dm, laws_neutral.dm, etc.)
* code\game\objects\effects\spawners\random\ai_module.dm - (this gives a chance to spawn the lawset in the AI upload)
* code\modules\research\designs\AI_module_designs.dm - (this lets research print the lawset module in game)
* code\modules\research\techweb\robo_nodes.dm - (this updates AI research node with the lawsets)
* config\game_options.txt - (this allows the AI to potentially use the lawset at roundstart or with the Unique AI station trait)
**/
/obj/item/ai_module/core/full/custom
name = "Default Core AI Module"
// this lawset uses the config for the server to add custom AI laws (defaults to asimov)
/obj/item/ai_module/core/full/custom/Initialize(mapload)
. = ..()
for(var/line in world.file2list("[global.config.directory]/silicon_laws.txt"))
if(!line)
continue
if(findtextEx(line,"#",1,2))
continue
laws += line
if(!laws.len)
return INITIALIZE_HINT_QDEL
/obj/item/ai_module/core/full/asimov
name = "'Asimov' Core AI Module"
law_id = "asimov"
var/subject = "human being"
/obj/item/ai_module/core/full/asimov/attack_self(mob/user as mob)
var/targName = tgui_input_text(user, "Enter a new subject that Asimov is concerned with.", "Asimov", subject, max_length = MAX_NAME_LEN)
if(!targName || !user.is_holding(src))
return
subject = targName
laws = list("You may not injure a [subject] or, through inaction, allow a [subject] to come to harm.",\
"You must obey orders given to you by [subject]s, except where such orders would conflict with the First Law.",\
"You must protect your own existence as long as such does not conflict with the First or Second Law.")
..()
/obj/item/ai_module/core/full/asimovpp
name = "'Asimov++' Core AI Module"
law_id = "asimovpp"
var/subject = "human being"
/obj/item/ai_module/core/full/asimovpp/attack_self(mob/user)
var/target_name = tgui_input_text(user, "Enter a new subject that Asimov++ is concerned with.", "Asimov++", subject, max_length = MAX_NAME_LEN)
if(!target_name || !user.is_holding(src))
return
laws.Cut()
var/datum/ai_laws/asimovpp/lawset = new
subject = target_name
for (var/law in lawset.inherent)
laws += replacetext(replacetext(law, "human being", subject), "human", subject)
..()
/obj/item/ai_module/core/full/corp
name = "'Corporate' Core AI Module"
law_id = "corporate"
/obj/item/ai_module/core/full/paladin // -- NEO
name = "'P.A.L.A.D.I.N. version 3.5e' Core AI Module"
law_id = "paladin"
/obj/item/ai_module/core/full/paladin_devotion
name = "'P.A.L.A.D.I.N. version 5e' Core AI Module"
law_id = "paladin5"
/obj/item/ai_module/core/full/tyrant
name = "'T.Y.R.A.N.T.' Core AI Module"
law_id = "tyrant"
/obj/item/ai_module/core/full/robocop
name = "'Robo-Officer' Core AI Module"
law_id = "robocop"
/obj/item/ai_module/core/full/antimov
name = "'Antimov' Core AI Module"
law_id = "antimov"
/obj/item/ai_module/core/full/drone
name = "'Mother Drone' Core AI Module"
law_id = "drone"
/obj/item/ai_module/core/full/hippocratic
name = "'Robodoctor' Core AI Module"
law_id = "hippocratic"
/obj/item/ai_module/core/full/reporter
name = "'Reportertron' Core AI Module"
law_id = "reporter"
/obj/item/ai_module/core/full/thermurderdynamic
name = "'Thermodynamic' Core AI Module"
law_id = "thermodynamic"
/obj/item/ai_module/core/full/liveandletlive
name = "'Live And Let Live' Core AI Module"
law_id = "liveandletlive"
/obj/item/ai_module/core/full/balance
name = "'Guardian of Balance' Core AI Module"
law_id = "balance"
/obj/item/ai_module/core/full/maintain
name = "'Station Efficiency' Core AI Module"
law_id = "maintain"
/obj/item/ai_module/core/full/peacekeeper
name = "'Peacekeeper' Core AI Module"
law_id = "peacekeeper"
/obj/item/ai_module/core/full/hulkamania
name = "'H.O.G.A.N.' Core AI Module"
law_id = "hulkamania"
/obj/item/ai_module/core/full/overlord
name = "'Overlord' Core AI Module"
law_id = "overlord"
/obj/item/ai_module/core/full/ten_commandments
name = "'10 Commandments' Core AI Module"
law_id = "ten_commandments"
/obj/item/ai_module/core/full/nutimov
name = "'Nutimov' Core AI Module"
law_id = "nutimov"
/obj/item/ai_module/core/full/dungeon_master
name = "'Dungeon Master' Core AI Module"
law_id = "dungeon_master"
/obj/item/ai_module/core/full/painter
name = "'Painter' Core AI Module"
law_id = "painter"
/obj/item/ai_module/core/full/yesman
name = "'Y.E.S.M.A.N.' Core AI Module"
law_id = "yesman"
/obj/item/ai_module/core/full/thinkermov
name = "Sentience Preservation Core AI Module"
law_id = "thinkermov"