Skip to main content

The Potential of Logic Programming as a Computational Tool to Model Morality

  • Chapter
A Construction Manual for Robots' Ethical Systems

Part of the book series: Cognitive Technologies ((COGTECH))

Abstract

We investigate the potential of logic programming (LP) to computationally model morality aspects studied in philosophy and psychology. We do so by identifying three morality aspects that appear in our view amenable to computational modeling by appropriately exploiting LP features: dual-process model (reactive and deliberative) in moral judgment, justification of moral judgments by contractualism, and intention in moral permissibility. The research aims at developing an LP-based system with features needed in modeling moral settings, putting emphasis on modeling these abovementioned morality aspects. We have currently co-developed two essential ingredients of the LP system, i.e., abduction and logic program updates, by exploiting the benefits of tabling features in logic programs. They serve as the basis for our whole system, into which other reasoning facets will be integrated, to model the surmised morality aspects. We exemplify two applications pertaining moral updating and moral reasoning under uncertainty and detail their implementation. Moreover, we touch upon the potential of our ongoing studies of LP-based cognitive features for the emergence of computational morality, in populations of agents enabled with the capacity for intention recognition, commitment, and apology. We conclude with a “message in a bottle” pertaining to this bridging of individual and population computational morality via cognitive abilities.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    This is an invited position chapter issuing from the Austrian Research Institute for Artificial Intelligence (OFAI) workshop on “A Construction Manual for Robots’ Ethical Systems: Requirements, Methods, Implementation, Tests”, Vienna, 27–28 September 2013.

  2. 2.

    The trolley dilemmas, adapted from [40]: “There is a trolley and its conductor has fainted. The trolley is headed toward five people walking on the track. The banks of the track are so steep that they will not be able to get off the track in time.” The two main cases of the trolley dilemmas:Bystander: Hank is standing next to a switch that can turn the trolley onto a side track, thereby preventing it from killing the five people. However, there is a man standing on the side track. Hank can throw the switch, killing him, or he can refrain from doing so, letting the five die. Is it morally permissible for Hank to throw the switch?Footbridge. Ian is on the bridge over the trolley track, next to a heavy man, which he can shove onto the track in the path of the trolley to stop it, preventing the killing of five people. Ian can shove the man onto the track, resulting in death, or he can refrain from doing so, letting the five die. Is it morally permissible for Ian to shove the man?

  3. 3.

    The doctrine of double effect states that doing harms to another individual is permissible if it is the foreseen consequence of an action that will lead to a greater good, but is impermissible as an intended means to such greater good [40].

  4. 4.

    In Sect. 10.5, whenever Prolog program codes are shown, <- is used to represent \(\leftarrow \) symbol in rules and integrity constraints.

  5. 5.

    Online demo at: http://centria.di.fct.unl.pt/~lmp/publications/slides/padl10/quick_moral_robot.avi.

  6. 6.

    In fact, another abductive scenario with solving_conflict being abduced also exists, but without follow(gandhi_moral) in it. This scenario is ruled out by a posteriori preference rules, which prioritize scenarios that uphold moral conducts, as shown by select∕2 definition (cf. plot 4).

References

  1. Alferes, J.J., Pereira, L.M.: NegABDUAL system. http://centria.di.fct.unl.pt/~lmp/software/contrNeg.rar (2007)

  2. Alferes, J.J., Brogi, A., Leite, J.A., Pereira, L.M.: Evolving logic programs. In: JELIA 2002. LNCS, vol. 2424, pp. 50–61. Springer, Heidelberg (2002)

    Google Scholar 

  3. Alferes, J.J., Pereira, L.M., Swift, T.: Abduction in well-founded semantics and generalized stable models via tabled dual programs. Theory Pract. Logic Program. 4(4), 383–428 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  4. Anderson, S.L.: Machine metaethics. In: Anderson, M., Anderson, S.L. (eds.) Machine Ethics. Cambridge University Press, Cambridge (2011)

    Chapter  Google Scholar 

  5. Anderson, M., Anderson, S.L.: EthEl: toward a principled ethical eldercare robot. In: Proceedings of AAAI Fall 2008 Symposium on AI in Eldercare (2008)

    Google Scholar 

  6. Anderson, M., Anderson, S.L.: Robot be good: a call for ethical autonomous machines. Sci. Am. 303(4), 72–77 (2010)

    Article  Google Scholar 

  7. Anderson, M., Anderson, S.L. (eds.): Machine Ethics. Cambridge University Press, Cambridge (2011)

    Google Scholar 

  8. Anderson, M., Anderson, S.L., Armen, C.: Towards machine ethics: implementing two action-based ethical theories. In: Proceedings of AAAI 2005 Fall Symposium on Machine Ethics (2005)

    Google Scholar 

  9. Anderson, M., Anderson, S., Armen, C.: MedEthEx: a prototype medical ethics advisor. In: IAAI 2006 (2006)

    Google Scholar 

  10. Aquinas, T.: Summa Theologica II-II, Q.64, art. 7, “Of Killing”. In: Baumgarth, W.P., Regan, R.J. (eds.) On Law, Morality, and Politics. Hackett, Indianapolis (1988)

    Google Scholar 

  11. Baral, C., Hunsaker, M.: Using the probabilistic logic programming language P-log for causal and counterfactual reasoning and non-naive conditioning. In: IJCAI 2007 (2007)

    Google Scholar 

  12. Baral, C., Gelfond, M., Rushton, N.: Probabilistic reasoning with answer sets. Theory Pract. Logic Program. 9(1), 57–144 (2009)

    Article  MATH  MathSciNet  Google Scholar 

  13. Bratman, M.E.: Intention, Plans and Practical Reasoning. Harvard University Press, Cambridge (1987)

    Google Scholar 

  14. Bringsjord, S., Arkoudas, K., Bello, P.: Toward a general logicist methodology for engineering ethically correct robots. IEEE Intell. Syst. 21(4), 38–44 (2006)

    Article  Google Scholar 

  15. Bringsjord, S., Taylor, J., van Heuveln, B., Arkoudas, K., Clark, M., Wojtowicz, R.: Piagetian roboethics via category theory: moving beyond mere formal operations to engineer robots whose decisions are guaranteed to be ethically correct. In: Anderson, M., Anderson, S.L. (eds.) Machine Ethics. Cambridge University Press, Cambridge (2011)

    Google Scholar 

  16. CiaoProlog: http://ciao-lang.org (2011)

  17. Cushman, F., Young, L., Greene, J.D.:. Multi-system moral psychology. In: Doris, J.M. (ed.) The Moral Psychology Handbook. Oxford University Press, Oxford (2010)

    Google Scholar 

  18. Danielson, P.: Artificial Morality: Virtuous Robots for Virtual Games. Routledge, New York (1992)

    Google Scholar 

  19. Dell’Acqua, P., Pereira, L.M.: Preferential theory revision. J. Appl. Log. 5(4), 586–601 (2007)

    Article  MATH  MathSciNet  Google Scholar 

  20. Dung, P.M.: On the acceptability of arguments and its fundamental role in nonmonotonic reasoning, logic programming and n-person games. Artif. Intell. 77(2), 321–357 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  21. Dung, P.M., Thang, P.M.: Towards probabilistic argumentation for jury-based dispute resolution. In: COMMA 2010 (2010)

    Google Scholar 

  22. Dung, P.M., Toni, F., Mancarella, P.: Some design guidelines for practical argumentation systems. In: Proceedings of 3rd International Conference on Computational Models of Argument (COMMA’10) (2010)

    Google Scholar 

  23. Economist: Morals and the machine. Main Front Cover and Leaders (page 13). The Economist, June 2nd–8th 2012

    Google Scholar 

  24. Evans, J.: Biases in deductive reasoning. In: Pohl, R. (ed.) Cognitive Illusions: A Handbook on Fallacies and Biases in Thinking, Judgement and Memory. Psychology Press, London (2012)

    Google Scholar 

  25. Evans, J., Barston, J.L., Pollard, P.: On the conflict between logic and belief in syllogistic reasoning. Mem. Cogn. 11(3), 295–306 (1983)

    Article  Google Scholar 

  26. Foot, P.: The problem of abortion and the doctrine of double effect. Oxf. Rev. 5, 5–15 (1967)

    Google Scholar 

  27. Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: 5th International Logic Programming Conference. MIT Press, Cambridge (1988)

    Google Scholar 

  28. Gigerenzer, G., Engel, C. (eds.): Heuristics and the Law. MIT Press, Cambridge (2006)

    Google Scholar 

  29. Greene, J.D., Sommerville, R.B., Nystrom, L.E., Darley, J.M., Cohen, J.D.: An fMRI investigation of emotional engagement in moral judgment. Science 293, 2105–2108 (2001)

    Article  Google Scholar 

  30. Greene, J.D., Nystrom, L.E., Engell, A.D., Darley, J.M., Cohen, J.D.: The neural bases of cognitive conflict and control in moral judgment. Neuron 44, 389–400 (2004)

    Article  Google Scholar 

  31. Guarini, M.: Computational neural modeling and the philosophy of ethics: reflections on the particularism-generalism debate. In: Anderson, M., Anderson, S.L. (eds.) Machine Ethics. Cambridge University Press, Cambridge (2011)

    Google Scholar 

  32. Haidt, J., Hersh, M.: Sexual morality. J. Appl. Soc. Psychol. 31, 191–221 (2001)

    Article  Google Scholar 

  33. Han, T.A.: Intention Recognition, Commitments and Their Roles in the Evolution of Cooperation: From Artificial Intelligence Techniques to Evolutionary Game Theory Models. SAPERE, vol. 9. Springer, New York (2013). ISBN 978-3-642-37511-8

    Google Scholar 

  34. Han, T.A., Pereira, L.M.: Intention-based decision making with evolution prospection. In: EPIA 2011. LNAI, vol. 7026. Springer, Berlin (2011)

    Google Scholar 

  35. Han, T.A., Pereira, L.M.: State-of-the-art of intention recognition and its use in decision making. AI Commun. 26(2), 237–246 (2013)

    MathSciNet  Google Scholar 

  36. Han, T.A., Ramli, C.D.K., Damásio, C.V.: An implementation of extended P-log using XASP. In: Proceedings of 24th International Conference on Logic Programming (ICLP’08). LNCS, vol. 5366. Springer, Heidelberg (2008)

    Google Scholar 

  37. Han, T.A., Saptawijaya, A., Pereira, L.M.: Moral reasoning under uncertainty. In: LPAR-18. LNCS, vol. 7180, pp. 212–227. Springer, Heidelberg (2012)

    Google Scholar 

  38. Han, T.A., Pereira, L.M., Santos, F.C., Lenearts, T.: Good agreements make good friends. Nat. Sci. Rep. 3, 2695 (2013). doi:10.1038/srep02695

    Google Scholar 

  39. Han, T.A., Pereira, L.M., Santos, F.C., Lenearts, T.: Why is it so hard to say sorry: the evolution of apology with commitments in the iterated prisoner’s dilemma. In: IJCAI 2013, pp. 177–183. AAAI Press, Beijing (2013)

    Google Scholar 

  40. Hauser, M.D.: Moral Minds: How Nature Designed Our Universal Sense of Right and Wrong. Little Brown, London (2007)

    Google Scholar 

  41. Inhelder, B., Piaget, J.: The Growth of Logical Thinking from Childhood to Adolescence. Basic Books, New York (1958)

    Book  Google Scholar 

  42. Jonsen, A.R., Toulmin, S.: The Abuse of Casuistry: A History of Moral Reasoning. University of California Press, Los Angeles (1988)

    Google Scholar 

  43. Kakas, A., Kowalski, R., Toni, F.: The role of abduction in logic programming. In: Gabbay, D., Hogger, C., Robinson, J. (eds.) Handbook of Logic in Artificial Intelligence and Logic Programming, vol. 5. Oxford University Press, Oxford (1998)

    Google Scholar 

  44. Kamm, F.M.: Intricate Ethics: Rights, Responsibilities, and Permissible Harm. Oxford University Press, Oxford (2006)

    Google Scholar 

  45. Kant, I.: Grounding for the Metaphysics of Morals, translated by J. Ellington. Hackett, Indianapolis (1981)

    Google Scholar 

  46. Kowalski, R.: Computational Logic and Human Thinking: How to be Artificially Intelligent. Cambridge University Press, Cambridge (2011)

    Book  Google Scholar 

  47. Kowalski, R., Sadri, F.: Abductive logic programming agents with destructive databases. Ann. Math. Artif. Intell. 62(1), 129–158 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  48. Kowalski, R., Sadri, F.: A logic-based framework for reactive systems. In: RuleML 2012. LNCS, vol. 7438 (2012)

    Google Scholar 

  49. Krebs, D.L.: The Origins of Morality: An Evolutionary Account. Oxford University Press, Oxford (2011)

    Book  Google Scholar 

  50. Lopes, G., Pereira, L.M.: Prospective programming with ACORDA. In: ESCoR 2006 Workshop, IJCAR’06 (2006)

    Google Scholar 

  51. Lopes, G., Pereira, L.M.: Prospective storytelling agents. In: PADL 2010. LNCS, vol. 5937. Springer, Heidelberg (2010)

    Google Scholar 

  52. Mallon, R., Nichols, S.: Rules. In: Doris, J.M. (ed.) The Moral Psychology Handbook. Oxford University Press, Oxford (2010)

    Google Scholar 

  53. McLaren, B.M.: Computational models of ethical reasoning: challenges, initial steps, and future directions. IEEE Intell. Syst. 21(4), 29–37 (2006)

    Article  Google Scholar 

  54. Mikhail, J.: Universal moral grammar: theory, evidence, and the future. Trends Cogn. Sci. 11(4), 143–152 (2007)

    Article  Google Scholar 

  55. Newman, J.O.: Quantifying the standard of proof beyond a reasonable doubt: a comment on three comments. Law Probab. Risk 5(3–4), 267–269 (2006)

    Google Scholar 

  56. Pearl, J.: Causality: Models, Reasoning and Inference. Cambridge University Press, Cambridge (2009)

    Book  MATH  Google Scholar 

  57. Pearl, J.: The algorithmization of counterfactuals. Ann. Math. Artif. Intell. 61(1), 29–39 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  58. Pereira, L.M.: Evolutionary tolerance. In: Magnani, L., Ping, L. (eds.) PCS 2011. SAPERE, vol. 2, pp. 263–287. Springer, Berlin (2012)

    Google Scholar 

  59. Pereira, L.M., Han, T.A.: Evolution prospection. In: Proceedings of KES International Conference on Intelligence Decision Technologies, vol. 199, pp. 139–150 (2009)

    Google Scholar 

  60. Pereira, L.M., Han, T.A.: Intention recognition with evolution prospection and causal bayesian networks. In: Madureira, A., Ferreira, J., Vale, Z. (eds.) Computational Intelligence for Engineering Systems: Emergent Applications. Intelligent Systems, Control and Automation: Science and Engineering Book Series, vol. 46, pp. 1–33. Springer, Heidelberg (2011)

    Google Scholar 

  61. Pereira, L.M., Lopes, G.: Prospective logic agents. Int. J. Reason. Based Intell. Syst. 1(3/4), 200–208 (2009)

    Article  Google Scholar 

  62. Pereira, L.M., Pinto, A.M.: Approved models for normal logic programs. In: Proceedings of 14th International Conference on Logic for Programming Artificial Intelligence and Reasoning (LPAR’07). LNAI, vol. 4790. Springer, Heidelberg (2007)

    Google Scholar 

  63. Pereira, L.M., Pinto, A.M.: Inspecting side-effects of abduction in logic programs. In: Balduccini, M., Son, T.C. (eds.) Logic Programming, Knowledge Representation, and Nonmonotonic Reasoning: Essays in Honour of Michael Gelfond. LNAI, vol. 6565, pp. 148–163. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  64. Pereira, L.M., Saptawijaya, A.: Moral decision making with ACORDA. In: Local Proceedings of LPAR 2007 (2007)

    Google Scholar 

  65. Pereira, L.M., Saptawijaya, A.: Modelling morality with prospective logic. In: EPIA 2007 (2007)

    Book  Google Scholar 

  66. Pereira, L.M., Saptawijaya, A.: Modelling morality with prospective logic. Int. J. Reason. Based Intell. Syst. 1(3/4), 209–221 (2009)

    Article  Google Scholar 

  67. Pereira, L.M., Saptawijaya, A.: Computational modelling of morality. Assoc. Logic Program. Newslett. 22(1), (2009)

    Google Scholar 

  68. Pereira, L.M., Saptawijaya, A.: Modelling morality with prospective logic. In: Anderson, M., Anderson, S.L. (eds.) Machine Ethics, pp. 398–421. Cambridge University Press, Cambridge (2011)

    Chapter  Google Scholar 

  69. Pereira, L.M., Saptawijaya, A.: Abductive logic programming with tabled abduction. In: ICSEA 2012, pp. 548–556. ThinkMind (2012)

    Google Scholar 

  70. Pereira, L.M., Dietz, E.-A., Hölldobler, S.: Contextual abductive reasoning with side-effects. Theory Pract. Logic Program., 14(4–5), 633–648 (2014)

    Article  MATH  Google Scholar 

  71. Pereira, L.M., Han, T.A., Santos, F.C.: Complex systems of mindful entities: on intention recognition and commitment. In: Magnani, L. (ed.) Model-Based Reasoning in Science and Technology: Theoretical and Cognitive Issues. SAPERE, vol. 8. Springer, Berlin (2013)

    Google Scholar 

  72. Poole, D.L.: A logical framework for default reasoning. Artif. Intell. 36 (1), 27–47 (1988)

    Article  MATH  MathSciNet  Google Scholar 

  73. Powers, T.M.: Prospects for a Kantian machine. IEEE Intell. Syst. 21 (4), 46–51 (2006)

    Article  Google Scholar 

  74. Rahwan, I., Simari, G. (eds.): Argumentation in Artificial Intelligence. Springer, Berlin (2009)

    Google Scholar 

  75. Ross, W.D.: The Right and the Good. Oxford University Press, Oxford (1930)

    Google Scholar 

  76. Saptawijaya, A., Pereira, L.M.: Tabled abduction in logic programs (technical communication of ICLP 2013). Theory Pract. Logic Program. Online Suppl. 13(4–5), 1–14 (2013)

    Google Scholar 

  77. Saptawijaya, A., Pereira, L.M.: Incremental tabling for query-driven propagation of logic program updates. In: LPAR-19. LNCS ARCoSS, vol. 8312. Springer, Heidelberg (2013)

    Google Scholar 

  78. Saptawijaya, A., Pereira, L.M.: Program updating by incremental and answer subsumption tabling. In: LPNMR 2013. LNCS, vol. 8148. Springer, Heidelberg (2013)

    Google Scholar 

  79. Saptawijaya, A., Pereira, L.M.: Towards practical tabled abduction usable in decision making. In: KES-IDT 2013, Frontiers of Artificial Intelligence and Applications (FAIA). IOS Press, Amsterdam (2013)

    Google Scholar 

  80. Scanlon, T.M.: Contractualism and utilitarianism. In: Sen, A., Williams, B. (eds.) Utilitarianism and Beyond. Cambridge University Press, Cambridge (1982)

    Google Scholar 

  81. Scanlon, T.M.: What We Owe to Each Other. Harvard University Press, Cambridge (1998)

    Google Scholar 

  82. Scanlon, T.M.: Moral Dimensions: Permissibility, Meaning, Blame. Harvard University Press, Cambridge (2008)

    Book  Google Scholar 

  83. Smodels System: http://www.tcs.hut.fi/Software/smodels/ (2008)

  84. Thomson, J.J.: The trolley problem. Yale Law J. 279, 1395–1415 (1985)

    Article  Google Scholar 

  85. Toni, F.: Argumentative agents. In: Proceedings of the International Multiconference on Computer Science and Information Technology, vol. 5 (2010)

    Google Scholar 

  86. van den Hoven, J., Lokhorst, G.-J.: Deontic logic and computer-supported computer ethics. Metaphilosophy 33(3), 376–386 (2002)

    Article  Google Scholar 

  87. van Gelder, A., Ross, K.A., Schlipf, J.S.: The well-founded semantics for general logic programs. J. ACM 38(3), 620–650 (1991)

    MATH  Google Scholar 

  88. Wallach, W., Allen, C.: Moral Machines: Teaching Robots Right from Wrong. Oxford University Press, Oxford (2009)

    Book  Google Scholar 

  89. Wiegel, V.: SophoLab; experimental computational philosophy. Ph.D. thesis, Delft University of Technology (2007)

    Google Scholar 

  90. XSB Prolog: http://xsb.sourceforge.net/ (2015)

  91. YAProlog: http://www.dcc.fc.up.pt/~vsc/Yap (2014)

Download references

Acknowledgements

We thank Gonçalo Lopes for clarifying the implementation of the interactive robot storytelling, and The Anh Han for joint work. Ari Saptawijaya acknowledges the support of Fundação para a Ciência e a Tecnologia (FCT/MEC) Portugal, grant SFRH/BD/72795/2010, Luís Moniz Pereira acknowledges the support of FCT/MEC NOVA LINCS PEst UID/CEC/04516/2013.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ari Saptawijaya .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Saptawijaya, A., Pereira, L.M. (2015). The Potential of Logic Programming as a Computational Tool to Model Morality. In: Trappl, R. (eds) A Construction Manual for Robots' Ethical Systems. Cognitive Technologies. Springer, Cham. https://doi.org/10.1007/978-3-319-21548-8_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-21548-8_10

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-21547-1

  • Online ISBN: 978-3-319-21548-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics