{"id":13434836,"url":"https://github.com/opennars/OpenNARS-for-Applications","last_synced_at":"2025-03-18T01:32:13.208Z","repository":{"id":37045956,"uuid":"240934885","full_name":"opennars/OpenNARS-for-Applications","owner":"opennars","description":"General reasoning component for applications based on NARS theory.","archived":false,"fork":false,"pushed_at":"2025-03-17T14:35:04.000Z","size":2844,"stargazers_count":97,"open_issues_count":15,"forks_count":41,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-17T15:48:41.319Z","etag":null,"topics":["ai","artificial-intelligence","nal","nars","non-axiomatic-logic","non-axiomatic-reasoning","procedu","reasoner","reasoning"],"latest_commit_sha":null,"homepage":"https://cis.temple.edu/~pwang/NARS-Intro.html","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opennars.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-16T17:33:05.000Z","updated_at":"2025-03-15T00:03:18.000Z","dependencies_parsed_at":"2023-02-13T01:30:25.961Z","dependency_job_id":"e021b5fc-4f10-462f-99c4-935857671334","html_url":"https://github.com/opennars/OpenNARS-for-Applications","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opennars%2FOpenNARS-for-Applications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opennars%2FOpenNARS-for-Applications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opennars%2FOpenNARS-for-Applications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opennars%2FOpenNARS-for-Applications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opennars","download_url":"https://codeload.github.com/opennars/OpenNARS-for-Applications/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244139364,"owners_count":20404504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artificial-intelligence","nal","nars","non-axiomatic-logic","non-axiomatic-reasoning","procedu","reasoner","reasoning"],"created_at":"2024-07-31T03:00:24.682Z","updated_at":"2025-03-18T01:32:12.645Z","avatar_url":"https://github.com/opennars.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/8284677/74609985-02087e80-50e7-11ea-9562-218dec34714d.png\" height=\"250\"\u003e\u003c/div\u003e\n\nImplementation of a Non-Axiomatic Reasoning System [6], a general-purpose reasoner that adapts under the Assumption of Insufficient Knowledge and Resources [7].\n\nThis is a completely new platform and not branched from the existing OpenNARS codebase. The ONA (OpenNARS for Applications) system [1] takes the logic and conceptual ideas of OpenNARS, the event handling and procedure learning capabilities of ANSNA [2, 3] and 20NAR1 [11], and the control model from ALANN [4]. The system is written in C, is more capable than our previous implementations in terms of reasoning performance, and has also been experimentally compared with Reinforcement Learning [5, 6] and means-end reasoning approaches such as BDI models [6]. Additionally, it has become the core reasoning component of a system assisting first responders (Trusted and explainable Artificial Intelligence for Saving Lives, [6]) while driving and completing their mission. This was done in cooperation with NASA Jet Propulsion Laboratory. Also it has been tried for real-time traffic surveillance in cooperation with Cisco Systems [7]. Last, initial experiments for using the system for autonomous robots have been carried out [6], and more is yet to come.\n\nThe ONA implementation has been developed with a pragmatic mindset. The focus on the design has been to implement the 'existing' theory [8, 9] as effectively as possible and make firm decisions rather than keep as many options open as possible. This has led to some small conceptual differences to OpenNARS [10] which was developed for research purposes. \n\nVideo tutorials and demo videos can be found here: [Video tutorials](https://github.com/opennars/OpenNARS-for-Applications/wiki/Video-tutorials)\nOr click on the picture to watch the newest summary videos (summary and demo):\n\n[![Reasoning-learning systems based on Non Axiomatic Reasoning Theory](https://img.youtube.com/vi/pEiJ8V17RGk/0.jpg)](https://www.youtube.com/watch?v=pEiJ8V17RGk \"Reasoning-learning systems based on Non Axiomatic Reasoning Theory\")\n\n[![Autonomy through real-time learning and OpenNARS for Applications](https://img.youtube.com/vi/B9SKu7u6G-I/0.jpg)](https://www.youtube.com/watch?v=B9SKu7u6G-I \"Autonomy through real-time learning and OpenNARS for Applications\")\n\n[![OpenNARS for Applications v0.9.0: Transbot](https://img.youtube.com/vi/lp6rNO-nIms/0.jpg)](https://www.youtube.com/watch?v=lp6rNO-nIms \"ONA v0.9.0: Playing Fetch with Henry the robot\")\n\nProcedure learning demos (variants of Pong and Space Invaders, Test Chamber, Cartpole, food collecting agent, ...): https://www.youtube.com/watch?v=oyQ250H5owE\n\n***How to clone and compile (tested with GCC and Clang for x64, x86 and ARM):***\n\n```\ngit clone https://github.com/opennars/OpenNARS-for-Applications\ncd OpenNARS-for-Applications\n./build.sh\n```\n\nAdditionally the parameter -DHARDENED can be passed to build.sh to end up with a slimmer system without language learning abilities.\n\n***How to set the amount of threads the system should run with: (to be tested more, compile with ./build.sh -fopenmp)***\n```\nexport OMP_NUM_THREADS=4  // 4 threads seems to be the sweet spot. More threads leads to more contention and less speed currently\n```\n\nIf you have trouble building with OpenMP, then you probably need to specify library (and / or sources) directory alongside the `-fopenmp` option, like `-L\u003cpath to your openmp\u003e` or `-I\u003cpath to your openmp\u003e`.\n\n***How to run the interactive Narsese shell:***\n\n```\n./NAR shell\n```\n\n***with syntax highlighting:***\n\n```\n./NAR shell | python3 colorize.py\n```\n\n***For a proper reliable GPT-based English language channel***\n\nCheck out [NARS-GPT](https://github.com/opennars/NARS-GPT) \u003cimg src=\"https://user-images.githubusercontent.com/8284677/234757994-5e8ad001-c5b1-4aa1-abe7-c56a4f7012dd.png\" width=\"50px\"\u003e!\n\n***with legacy English NLP shell and syntax highlighting:***\n\n```\npython3 english_to_narsese.py | ./NAR shell | python3 colorize.py\n```\n\n***How to run the C tests and then receive instructions how to run the current example programs:***\n\n```\n./NAR\n```\n\n***How to run all C tests, and all Narsese and English examples as integration tests, and collect metrics across all examples:***\n\n```\npython3 evaluation.py\n```\n\nFor the current output, see [Evaluation results](https://github.com/opennars/OpenNARS-for-Applications/wiki/Evaluation-Results-(Tests,-metrics))\n\n**How to run an example file:**\n\nNarsese:\n\n```\n./NAR shell \u003c ./examples/nal/example1.nal\n```\n\nEnglish: (tested with NLTK v3.4.5, v3.5)\n\n```\npython3 english_to_narsese.py \u003c ./examples/english/story1.english | ./NAR shell\n```\n\n**How to run an UDPNAR:**\n\n```\n./NAR UDPNAR IP PORT timestep(ns per cycle) printDerivations\n./NAR UDPNAR 127.0.0.1 50000 10000000 true\n```\n\nwhere the output can be logged simply by appending\n\n```\n\u003e output.log\n```\n\n**How to reach us:**\n\nReal-time team chat: #nars IRC channel @ libera.chat, #nars:matrix.org (accessible via Riot.im)\n\nGoogle discussion group: https://groups.google.com/forum/#!forum/open-nars\n\n**Acknowledgement**\n\nOver the years, research and development on this reasoning system has been funded by [Digital Futures](https://www.digitalfutures.kth.se/research/postdoc-fellowships/completed-postdoc-fellowships/intelligence-through-reasoning/), Cisco and NASA Jet Propulsion Laboratory.\n\n**References**\n\n[1] Hammer, P., \u0026 Lofthouse, T. (2020, September). [‘OpenNARS for Applications’: Architecture and Control](https://www.researchgate.net/publication/342713626_%27OpenNARS_for_Applications%27_Architecture_and_Control). In International Conference on Artificial General Intelligence (pp. 193-204). Springer, Cham.\n\n[2] Hammer, P. (2019, August). [Adaptive Neuro-Symbolic Network Agent](http://agi-conf.org/2019/wp-content/uploads/2019/07/paper_15.pdf). In International Conference on Artificial General Intelligence (pp. 80-90). Springer, Cham.\n\n[3] Hammer, P., \u0026 Lofthouse, T. (2018, August). [Goal-directed procedure learning](https://www.researchgate.net/publication/326525686_Goal-Directed_Procedure_Learning_11th_International_Conference_AGI_2018_Prague_Czech_Republic_August_22-25_2018_Proceedings). In International Conference on Artificial General Intelligence (pp. 77-86). Springer, Cham.\n\n[4] Lofthouse, T. (2019). [ALANN: An event driven control mechanism for a non-axiomatic reasoning system (NARS)](https://cis.temple.edu/tagit/events/papers/Lofthouse.pdf). NARS2019 workshop at AGI 2019.\n\n[5] Eberding, L. M., Thórisson, K. R., Sheikhlar, A., \u0026 Andrason, S. P. (2020). [SAGE: Task-Environment Platform for Evaluating a Broad Range of AI Learners](http://alumni.media.mit.edu/~kris/ftp/SAGE__Task_Environment_Platform_for_Evaluating_a_Broad_Range_of_AI_Learners.pdf). In Artificial General Intelligence: 13th International Conference, AGI 2020, St. Petersburg, Russia, September 16–19, 2020, Proceedings (Vol. 12177, p. 72). Springer Nature.\n\n[6] Hammer, P. (2021, July). [Autonomy through real-time learning and OpenNARS for Applications](https://github.com/opennars/OpenNARS-for-Applications/files/6832325/Dissertation_PH_Submitted.pdf). PhD thesis at Department of Computer and Information Sciences, Temple Universitiy\n\n[7] Hammer, P., Lofthouse, T., Fenoglio, E., Latapie, H., \u0026 Wang, P. (2020, September). [A reasoning based model for anomaly detection in the Smart City domain](https://www.researchgate.net/publication/335444390_A_reasoning_based_model_for_anomaly_detection_in_the_Smart_City_domain). In Proceedings of SAI Intelligent Systems Conference (pp. 144-159). Springer, Cham.\n\n[8] Wang, P. (2013). [Non-axiomatic logic: A model of intelligent reasoning](https://www.worldscientific.com/worldscibooks/10.1142/8665). World Scientific.\n\n[9] Wang, P. (2009, October). [Insufficient Knowledge and Resources-A Biological Constraint and Its Functional Implications](https://cis.temple.edu/~pwang/Publication/AIKR.pdf). In AAAI Fall Symposium: Biologically Inspired Cognitive Architectures.\n\n[10] Hammer, P., Lofthouse, T., \u0026 Wang, P. (2016, July). [The OpenNARS implementation of the non-axiomatic reasoning system](https://cis.temple.edu/~pwang/Publication/OpenNARS.pdf). In International conference on artificial general intelligence (pp. 160-170). Springer, Cham.\n\n[11] Wünsche, R. (2021, October). 20NAR1-An Alternative NARS Implementation Design. In International Conference on Artificial General Intelligence (pp. 283-291). Springer, Cham.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopennars%2FOpenNARS-for-Applications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopennars%2FOpenNARS-for-Applications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopennars%2FOpenNARS-for-Applications/lists"}