Skip to content

Instantly share code, notes, and snippets.

View jirkapenzes's full-sized avatar

jirkapenzes jirkapenzes

View GitHub Profile
@jirkapenzes
jirkapenzes / ThreeLawsOfRobotics.java
Last active May 26, 2020 07:33
Three Laws of Robotics
// Three Laws of Robotics
public void processAction(Ai ai, Action action, Environment environment) {
List<Human> humans = detectHumans(environment);
// A robot may not injure a human being or, through inaction,
// allow a human being to come to harm.
if (ai.predict(action).injure(humans)) {
throw new FirstLawsException();
}
@jamesmacaulay
jamesmacaulay / Clojure.sublime-settings
Last active January 18, 2021 19:01
Clojure stuff for Sublime Text 2. Files live in ~/Application Support/Sublime Text 2/Packages/User
// installed Clojure packages:
//
// * BracketHighlighter
// * lispindent
// * SublimeREPL
// * sublime-paredit
{
"word_separators": "/\\()\"',;!@$%^&|+=[]{}`~?",
"paredit_enabled": true,