Abstract
This paper supplies a computational model, via Logic Programming (LP), of counterfactual reasoning of autonomous agents with application to morality. Counterfactuals are conjectures about what would have happened had an alternative event occurred. The first contribution of the paper is showing how counterfactual reasoning is modeled using LP, benefiting from LP abduction and updating. The approach is inspired by Pearl’s structural causal model of counterfactuals, where causal direction and conditional reasoning are captured by inferential arrows of rules in LP. Herein, LP abduction hypothesizes background conditions from given evidence or observations, whereas LP updating frame these background conditions as a counterfactual’s context, and then imposes causal interventions on the program through defeasible LP rules. The second contribution it to apply counterfactuals to agent morality using this LP-based approach. We demonstrate its potential for specifying and querying moral issues, by examining viewpoints on moral permissibility via classic moral principles and examples taken from the literature. Application results were validated on a prototype implementing the approach on top of an integrated LP abduction and updating system supporting tabling.
Some main parts of this chapter are to be found adapted and integrated into a subsequently elaborated book by the same authors [47], comprising many materials from the authors’ previous works. This chapter defines and uses common notations and semantics as the book—which are standard. The chapter, however, is concentrated and self-contained; and especially geared to those concerned with just a logic formulation of counterfactuals in Logic Programming, and their use in computational morality, in a self-sufficient manner. The book is much more ample in scope, and combines a number of other computational logic aspects of morality, and of which counterfactual reasoning is just one, and where it is entwined with other facets present in the book. This chapter focusses only on the formulation, treatment and morality application of counterfactuals.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
In the sequel, unless otherwise specified, we generally write logic programs, or simply programs, to refer to normal logic programs.
- 2.
In the sequel, we simply write interpretations and models to refer to Herbrand interpretations and Herbrand models, respectively.
- 3.
We assume that people are using counterfactuals to convey truly relevant information rather than to fabricate arbitrary subjunctive conditionals (e.g., “If I had been watching, then I would have seen the cheese on the moon melt during the eclipse”). Otherwise, implicit observations must simply be made explicit observations, to avoid natural language conundrums or ambiguities [23].
- 4.
This interpretation is in line with the corresponding English construct, cf. [27], commonly known as third conditionals.
- 5.
This replacement of abducible \(A\not \in {E}\) with \({\mathsf {u}} \) in P and \(\mathcal {I} \) is an alternative but equivalent to adding \({A}\leftarrow {{\mathsf {u}}}\) into \(P\cup E\), as foreseen by Definition 12.
- 6.
Both WFS and WCS are 3-valued semantics that differ in dealing with close world assumption (CWA) and rules with positive loops (e.g., \(p\leftarrow p\)). WFS enforces CWA, i.e., atom a that has no rule is interpreted as false, whereas in WCS undefined. Nevertheless, they can be transformed one to another: adding rules \(a\leftarrow u\) and \(u\leftarrow not\ u\) for a reserved atom u renders a unknown in WFS; alternatively, adding \(a\leftarrow false\) enforces CWA in WCS. In this paper, positive loops are not needed and do not appear throughout examples we consider.
References
Alferes, J. J., Brogi, A., Leite, J. A. & Pereira, L. M. (2002). Evolving logic programs. In Proceedings of European Conference on Artificial Intelligence (JELIA 2002)(Vol. 2424, pp. 50–61). LNCS, Springer.
Alferes, J. J., Leite, J. A., Pereira, L. M., Przymusinska, H., & Przymusinski, T. (2000). Dynamic updates of non-monotonic knowledge bases. Journal of Logic Programming, 45(1–3), 43–70.
Alferes, J. J., & Pereira, L. M. (1996). Reasoning with logic programming (Vol. 1111). LNAI, Berlin: Springer.
Alferes, J. J., Pereira, L. M., & Swift, T. (2004). Abduction in well-founded semantics and generalized stable models via tabled dual programs. Theory and Practice of Logic Programming, 4(4), 383–428.
Anderson, M. & Anderson, S. L. (2008). EthEl: Toward a principled ethical eldercare robot. In Proceedings AAAI 2008 Fall Symposium on AI in Eldercare.
Anderson, M., Anderson, S. L. & Armen, C. (2006). MedEthEx: a prototype medical ethics advisor. In Proceedings of 18th Innovative Applications of Artificial Intelligence Conference (IAAI 2006).
Aquinas, T. (1998). Summa Theologica II-II, Q.64, art. 7, Of Killing. In W. P. Baumgarth & R. J. Regan, Eds, On Law, Morality, and Politics. Hackett.
Baral, C. & Hunsaker, M. (2007). Using the probabilistic logic programming language P-log for causal and counterfactual reasoning and non-naive conditioning. In Proceedings of 20th International Joint Conference on Artificial Intelligence (IJCAI).
Bidoit, N., & Froidevaux, C. (1991). General logic databases and programs: default logic semantics and stratification. Journal of Information and Computation, 91(1), 15–54.
Bringsjord, S., Arkoudas, K., & Bello, P. (2006). Toward a general logicist methodology for engineering ethically correct robots. IEEE Intelligent Systems, 21(4), 38–44.
Byrne, R. M. J. (2007). The rational imagination: How people create alternatives to reality. Cambridge, MA: MIT Press.
Chockler, H., & Halpern, J. Y. (2004). Responsibility and blame: A structural-model approach. Journal of Artificial Intelligence Research, 22, 93–115.
Collins, J., Hall, N., & Paul, L. A. (Eds.). (2004). Causation and counterfactuals. Cambridge, MA: MIT Press.
Dell’Acqua, P., & Pereira, L. M. (2007). Preferential theory revision. Journal of Applied Logic, 5(4), 586–601.
Dietz, E.-A., Hölldobler, S. & Pereira, L. M. (2015). On indicative conditionals. In Procs. 1st International Workshop on Semantic Technologies (IWOST) (Vol. 1339), CEUR Workshop Proceedings.
Epstude, K., & Roese, N. J. (2008). The functional theory of counterfactual thinking. Personality and Social Psychology Review, 12(2), 168–192.
Fitting, M. (1985). A Kripke-Kleene semantics for logic programs. Journal of Logic Programming, 2(4), 295–312.
Foot, P. (1967). The problem of abortion and the doctrine of double effect. Oxford Review, 5, 5–15.
Ganascia, J.-G. (2007). Modelling ethical rules of lying with answer set programming. Ethics and Information Technology, 9(1), 39–47.
Gelfond, M. (1987). On stratified autoepistemic theories. In Proceedings of 6th National Conference on Artificial Intelligence (AAAI).
Gelfond, M. & Lifschitz, V. (1988). The stable model semantics for logic programming. In Proceedings of 5th International Logic Programming Conference. MIT Press.
Ginsberg, M. L. (1986). Counterfactuals. Artificial Intelligence, 30(1), 35–79.
Grice, Paul. (1991). Studies in the way of words. Cambridge, MA: Harvard University Press.
Halpern, J. Y., & Hitchcock, C. (2015). Graded causation and defaults. British Journal for the Philosophy of Science, 66, 413–457.
Han, T. A., Saptawijaya, A. & Pereira, L. M. (2012). Moral reasoning under uncertainty. In Proceedings of 18th International Conference on Logic for Programming, Artificial Intelligence and Reasoning (LPAR) (Vol. 7180, pp. 212–227). LNCS, Springer.
Hauser, M., Cushman, F., Young, L., Jin, R. K., & Mikhail, J. (2007). A dissociation between moral judgments and justifications. Mind and Language, 22(1), 1–21.
Hewings, M. (2013). Advanced grammar in use with answers: A self-study reference and practice book for advanced learners of english. New York, NY: Cambridge University Press.
Hoerl, C., McCormack, T., & Beck, S. R. (Eds.). (2011). Understanding counterfactuals, understanding causation: Issues in philosophy and psychology. Oxford, UK: Oxford University Press.
Hölldobler, S. & Kencana Ramli, C. D. P. (2009). Logic programs under three-valued Łukasiewicz semantics. In Proceedings of 25th International Conference on Logic Programming (ICLP) (Vol. 5649, pp. 464–478). LNCS, Springer.
Kakas, A., Kowalski, R., & Toni, F. (1992). Abductive logic programming. Journal of Logic and Computation, 2(6), 719–770.
Kamm, F. M. (2006). Intricate ethics: Rights, responsibilities, and permissible harm. Oxford, UK: Oxford University Press.
Kleiman-Weiner, M., Gerstenberg, T., Levine, S. & Tenenbaum, J. B. (2015). Inference of intention and permissibility in moral decision making. In Proceedings of 37th Annual Conference of the Cognitive Science Society.
Kowalski, R. (2011). Computational logic and human thinking: How to be artificially intelligent. New York, NY: Cambridge University Press.
Lewis, D. (1973). Counterfactuals. Cambridge, MA: Harvard University Press.
Markman, K. D., Gavanski, I., Sherman, S. J., & McMullen, M. N. (1993). The mental simulation of better and worse possible worlds. Journal of Experimental Social Psychology, 29, 87–109.
McCloy, R., & Byrne, R. M. J. (2000). Counterfactual thinking about controllable events. Memory and Cognition, 28, 1071–1078.
McCormack, T., Frosch, C., & Burns, P. (2011). The relationship between children’s causal and counterfactual judgements. In C. Hoerl, T. McCormack, & S. R. Beck (Eds.), Understanding Counterfactuals., Understanding causation Oxford, UK: Oxford University Press.
McIntyre, A. (2004). Doctrine of double effect. In E. N. Zalta (Eds.), The Stanford Encyclopedia of Philosophy. Center for the Study of Language and Information, Stanford University (Fall 2011 edition) http://plato.stanford.edu/archives/fall2011/entries/double-effect/.
Migliore, S., Curcio, G., Mancini, F., & Cappa, S. F. (2014). Counterfactual thinking in moral judgment: an experimental study. Frontiers in Psychology, 5, 451.
Otsuka, M. (2008). Double effect, triple effect and the trolley problem: Squaring the circle in looping cases. Utilitas, 20(1), 92–110.
Pearl, J. (2009). Causality: Models reasoning and inference. Cambridge, MA: Cambridge University Press.
Pereira, L. M., Aparício, J. N. & Alferes, J. J. (1991). Counterfactual reasoning based on revising assumptions. In Proceedings of International Symposium on Logic Programming (ILPS 1991) (pp. 566–577). MIT Press.
Pereira, L. M., Aparício, J. N. & Alferes, J. J.(1991). Hypothetical reasoning with well founded semantics. In Proceedings of 3rd Scandinavian Conference on Artificial Intelligence. IOS Press.
Pereira, L. M., Dell’Acqua, P., Pinto, A. M. & Lopes, G. (2013). Inspecting and preferring abductive models. In K. Nakamatsu & L. C. Jain (Eds.), The Handbook on Reasoning-Based Intelligent Systems (pp. 243–274). World Scientific Publishers.
Pereira, L. M., Dietz, E.-A. & Hölldobler, S. (2016). Abductive framework for counterfactual reasoning in logic programming. Available from http://userweb.fct.unl.pt/~lmp/publications/online-papers/counterfactuals.pdf.
Pereira, L. M. & Saptawijaya, A. (2011). Modelling morality with prospective logic. In M. Anderson & S. L. Anderson (Eds.), Machine Ethics (pp. 398–421) Cambridge, U. K.
Pereira, L. M. & Saptawijaya, A. (2011). Programming Machine Ethics, volume 26 of Studies in Applied Philosophy, Epistemology and Rational Ethics. Springer, Switzerland, 2016.
Powers, T. M. (2006). Prospects for a Kantian machine. IEEE Intelligent Systems, 21(4), 46–51.
Przymusinska, H. & Przymusinski, T. C. (1990). Semantic issues in deductive databases and logic programs. In Formal Techniques in Artificial Intelligence: A Sourcebook (pp 321–367). North-Holand.
Przymusinski, T. C. (1989a). Every logic program has a natural stratification and an iterated least fixed point model. In Proceedings of 8th ACM Symposium on Principles Of Database Systems (PODS) (pp. 11–21).
Przymusinski, T. C. (1989b). Three-valued non-monotonics formalisms and logic programming. In Proceedings of 1st International Conference on Principles of Knowledge Representation and Reasoning (KR).
Roese, N. J. (1997). Counterfactual thinking. Psychological Bulletin, 121(1), 133–148.
Saptawijaya, A. & Pereira, L. M. (2013). Incremental tabling for query-driven propagation of logic program updates. In Proceedings of 19th International Conference on Logic Programming, Artificial Intelligence and Reasoning (LPAR) (Vol. 8312, pp. 694–709). LNCS, Springer.
Saptawijaya, A. & Pereira, L. M. (2014a). Joint tabling of logic program abductions and updates (Technical Communication of ICLP 2014). Theory and Practice of Logic Programming, 14(4–5). Online Supplement. Available from http://arxiv.org/abs/1405.2058.
Saptawijaya, A. & Pereira, L. M. (2014b). Towards modeling morality computationally with logic programming. In PADL 2014 (Vol. 8324, pp. 104–119). Springer.
Scanlon, T. M. (1998). What we owe to each other. Cambridge, MA: Harvard University Press.
Scanlon, T. M. (2008). Moral dimensions: Permissibility, meaning blame. Cambridge, MA: Harvard University Press.
Swift, T., & Warren, D. S. (2012). XSB: Extending Prolog with tabled logic programming. Theory and Practice of Logic Programming, 12(1–2), 157–187.
Tetlock, P. E., Visser, P. S., Singh, R., Polifroni, M., Scott, A., Elson, S. B., et al. (2007). People as intuitive prosecutors: The impact of social-control goals on attributions of responsibility. Journal of Experimental Social Psychology, 43, 195–209.
Thomson, J. J. (1985). The trolley problem. The Yale Law Journal, 279, 1395–1415.
van Emden, M. H., & Kowalski, R. (1976). The semantics of predicate logic as a programming language. Journal of the ACM, 4(23), 733–742.
van Gelder, A., Ross, K. A., & Schlipf, J. S. (1991). The well-founded semantics for general logic programs. Journal of the ACM, 38(3), 620–650.
Vennekens, J., Bruynooghe, M. & Denecker, M. (2010). Embracing events in causal modeling: Interventions and counterfactuals in CP-logic. In JELIA 2010 (Vol. 6341, pp. 313–325). LNCS. Springer.
Weiner, B. (1995). Judgments of responsibility: A foundation for a theory of social conduct. New York, NY: The Guilford Press.
Acknowledgements
We thank the anonymous reviewers for their constructive comments and suggestions. Both authors acknowledge the support from Fundação para a Ciência e a Tecnologia (FCT/MEC) NOVA LINCS PEst UID/CEC/04516/2013. Ari Saptawijaya acknowledges the support from FCT/MEC with the doctoral grant SFRH/BD/72795/2010. We thank Emmanuelle-Anna Dietz for the fruitful discussions.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this chapter
Cite this chapter
Pereira, L.M., Saptawijaya, A. (2017). Counterfactuals, Logic Programming and Agent Morality. In: Urbaniak, R., Payette, G. (eds) Applications of Formal Philosophy. Logic, Argumentation & Reasoning, vol 14. Springer, Cham. https://doi.org/10.1007/978-3-319-58507-9_3
Download citation
DOI: https://doi.org/10.1007/978-3-319-58507-9_3
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-58505-5
Online ISBN: 978-3-319-58507-9
eBook Packages: Religion and PhilosophyPhilosophy and Religion (R0)