SVG logo by Gaëtan Tapon (Paris, France)

RefPerSys, a free software symbolic artificial general intelligence project

 French
  flag RefPerSys (voir refpersys.org) est un projet (en septembre 2020, bénévole) de recherches et un logiciel libre en intelligence artificielle, inspiré par les travaux de feu Jacques Pitrat (1934 - oct.2019). Voir la journée d'hommage à J.Pitrat. Le lecteur est supposé capable de lire l'anglais.
Nous recherchons une source de financement possible (via des applications), par exemple non-exhaustif (en fin 2020) via l'Agence Nationale pour la Recherche - en s'intégrant dans un montage de projet -, appel AAPG2021, axes §2.1 (sciences de base pour l'énergie), §2.2 (Une énergie durable, propre, sûre et efficace), §3.8 Neurosciences intégratives et cognitives, §5.2 Intelligence Artificielle, §8.5 Mathématiques et sciences du numérique pour la biologie et la santé, §8.6 Révolution numérique : rapports au savoir et à la culture. Une autre possibilité serait de faire partie d' un projet innovant collaboratif BPI France. Veuillez alors contacter Basile Starynkevitch par courriel vers basile@starynkevitch.net ou basile-freelance@starynkevitch.net ou basile.starynkevitch@cea.fr.

 Russian flag RefPerSys (см. сайт refpersys.org) свободное программное обеспечение (ПСОК под лицензией GPLv3), для системы Linux/x86-64, в области симболицеского искусственного интеллекта (рефлексы, самоанализ, метазнание ...) по идеям Jacques Pitrat мы ищем партнеров в контексте www.indiarussiainnovate.org это работа в стадии разработки. А также ищем потенциальных приложений и пользователей. Пожалуйста, свяжитесь со мной, basile@starynkevitch.net (Василий Дмитриевич Старынкевич), который плохо читает и плохо говорит по-русски, но свободно владеет английским и французским языками. Jacques Pitrat был директором моего докторского жюри (в области искусственного интеллекта) защищенного в 1990 году (в Университете Paris 6).

  European flag RefPerSys (see refpersys.org) is a free software research artificial intelligence project and open source software (work in progress) for Linux, inspired by the works of the late Jacques Pitrat (1934 - oct.2019). See his blog on bootstrappingartificialintelligence.fr and read his book Artificial Beings, the Conscience of a Conscious Machine (ISBN 978-1848211018). We are looking for potential applications, partnerships, collaboration and some funding for working on this project. European R&D projects and calls for proposals like ITEA3 or HorizonEurope or ECS collaboration tool or comes to mind. Contact Basile Starynkevitch by email to basile@starynkevitch.net or basile-freelance@starynkevitch.net or basile.starynkevitch@cea.fr.

RefPerSys - refpersys.org

An acronym for Reflexive Persistent System. This is an ambitious research project (still unfunded, in 2019 - 2020 it is a hobby project; also very risky!), done on spare time with an open science mindset and ethics.

Early work in progress

We have in 2019 - 2020 a lot of ideas, and some code for Linux; in september 2020: 17KLOC measured by Wheeler's sloccount software. That code is on gitlab and mirrored on github. Done by passionate developers on their spare time. Volunteers wanted; please send an email (introducing yourself) to basile@starynkevitch.net (near Paris, France, homepage here) for more.

The RefPerSys development team

The following persons are working (in 2019 - 2020) on RefPerSys on their spare time from their home and are the copyright owners of the embryonic software.

The RefPerSys team of developers
who where email home page role
Basile Starynkevitch
(born in 1959, PhD in AI),
resume here
Bourg-la-Reine,
France, Europe
basile@starynkevitch.net
or basile-freelance@starynkevitch.net
starynkevitch.net/Basile/ project leader and architect
Abhishek Chakravarti Kolkota,
West Bengal, India
abhishek@taranjali.org taranjali.org/aboutme
and github.com/achakravarti
and gitlab.com/abhishekchakravarti
software developer
Nimesh Neema Indore,
Madhya Pradesh, India
nimeshneema@gmail.com nimeshneema.com software developer

design ideas

A draft document giving some design ideas is downloadable as refpersys-design.pdf. We are improving it in 2019 and 2020.

The currently temporary existing (in 2019 or 2020), on gitlab code base is a bit disappointing (since in summer 2020 most of it is still hand-coded by us, not yet generated), even to the Refpersys team. But we have a lot of fun doing it. It is constantly improving, publicly available, still unreleased, α-stage. We are aware of the replication crisis. We hope to generate most of RefPerSys C++ code at end of 2020. The external libraries used by RefPerSys may evolve with time, with the hope to provide some partial semi-formal description of their properties to the system. We are aware of Rice's theorem.

The major insight of RefPerSys is to generate most of (and hopefully all) its C++ code from higher level representations, based upon a cyclic graph of objects in virtual memory. That entire graph, called the persistent heap, is loaded at startup, and dumped at shutdown, from textual files (and later, external databases). It is garbage-collected.

values and objects in RefPerSys

The persistent heap contains immutable values and mutable objects. Each value is practically speaking a 64 bits word, often a pointer (which can refer to an object in memory, or to a small memory zone holding some data, conceptually some tagged union). Values are hashed and ordered, and are a The nil pointer usually represents a missing value.
Immutable values include:


Only objects are mutable. Since RefPerSys is multi-threaded, access to or update of objects require some synchronization (with mutexes etc...). Objects have each a (hopefully) globally unique objid which is textually representable, for example _8J6vNYtP5E800eCr5t. Objects are quite heavy but flexible data structures containing: Some of the above fields are std::atomic in C++, for performance reasons (to avoid locking the entire object). Even the object's class or space or payload or internal function pointers could change during runtime.

Most (but not all) objects are persistent (so reloaded at startup and dumped to disk or databases at shutdown).

metaprogramming and introspection in RefPerSys

An important feature of RefPerSys is meta-programming and code generation. During its runtime, the multi-threaded refpersys process should generate C++ or C code, compile that code into some shared library, then dlopen that generated shared object, and get function pointers inside it using then dlsym. See also the Program Library HOWTO, and the C++ dlopen mini HOWTO and the manydl.c example. Generated C++ code could be temporary or persistent (in that later case, it is version-controlled).

Another important feature of RefPerSys is introspection coupled with runtime profiling (see also time(7)...) which is reasonably possible in generated C++ code with the help of the garbage collector (explicit GC-ed call frames being singly-linked lists) and/or Ian Taylor's libbacktrace library and the dladdr(3) function. During its runtime, RefPerSys can inspect most of its call stacks. We later hope to use machine learning techniques on the profiling data and get some dynamic optimization, tailored to the concrete problems approached and actual applications of RefPerSys.

declarative knowledge and bootstrapping in RefPerSys

The insight of RefPerSys is to represent high-level expert system rules, fact bases and machine learning artefacts as collections of objects. The C++ generator should be described by meta-rules compiled by itself to C++ code. So we are taking a bootstrapping approach, first generating C++ code by hand-written C++ code, then replacing some of it by generated C++ code from higher-level knowledge representations, then progressively and incrementally improving these representations by higher-level and more abstract constructs. This should be worked on in 2021.

In practice, RefPerSys requires some graphical user interface with autocompletion facilities, and displaying graphically small parts of its heap (perhaps as abstract syntax trees or nested boxes), inspired by the past Centaur system.. It is well known that GUI toolkits like Qt or FLTK are more easily used with C++ code generators, which are parts of RefPerSys. So we need to work a lot.

talks

RefPerSys has been presented at a seminar organized by AFIA in Paris, on March 6th, 2020, dedicated to the memory of Jacques Pitrat, who died in october 2019. Contact Basile Starynkevitch for details. Slides are here in PDF. The video of the talk in French is here.

Please suggest by email to team@refpersys.org any AI conference, meeting, or workshop where this project could be presented.

documents

dependencies

The RefPerSys software depends on many other common stuff, notably a recent GCC compiler (in practice, GCC 10 in summer 2020), for C++17 with its standard library, a recent Linux kernel and C standard library (e.g. GNU glibc or Musl Libc), the JsonCPP library (for persistence) and the Qt or soon FLTK graphical toolkit, and the libbacktrace library. The GPP preprocessor is useful for some documentation. The AddressSanitizer facilities of GCC are sometimes useful.

A multi-core x86-64 Linux computer with more than 16Gbytes of RAM and at least 100Gbytes of free disk space is recommended. Qt is being replaced by FLTK, more friendly to RefPerSys garbage collector (since Qt, unlike FLTK, is creating threads without notice).

download α-stage source code

The GPLv3+ licensed α-stage embryonic free software source code of RefPerSys is on gitlab.com/bstarynk/refpersys.
We practically are using git as a centralized version control system, because we are very few and sill don't understand well in 2019 or 2020 how a genuinely distributed version control system could play nice with a reflexive, orthogonally persistent, homoiconic, bootstrapped, self-generating Quine system.

Daily snapshot with source and binary

A daily snapshot (of the master git branch) could be downloadable on refpersys-snapshot.tar.bz2. It is usually but not always automatically generated every day, so could be broken or very buggy. That bzip2 tar archive contains both source files, some log files of build, and binary ELF executable refpersys for Linux/x86-64. It is made in good faith, but could be very buggy and might do wrong things if you run that executable (daily built on Debian/Sid/x86-64). So use the refpersys executable in that snapshot, provided with no warranty, at your own risk. For cyber-security reasons, avoid running ./refpersys as root.
Use ./refpersys --help to understand the program arguments and environment variables, if any (they would be conventionally prefixed RPS_ or REFPERSYS_, see environ(7) for more) that could be relevant.

It is preferable to download RefPerSys from gitlab.com/bstarynk/refpersys and look into the active git branches, then to build it on your Linux computer. The build time with make could last one or a few minutes.

forum

A low-traffic forum hosted in France by FramaSoft (a non-profit association) is available on framalistes.org/sympa/info/refpersys-forum. Please subscribe if interested. Be polite and civil there. Only for public technical discussion in written English about implementation, architecture, or running issues of RefPerSys, including building problems (so not for philosophical discussions about AGI or singularity). If you have issues in subscribing, contact basile-freelance@starynkevitch.net by email. A typical message could have been this one. If you have built some RefPerSys executable and have tried to run it, that forum is the right place to ask help. Mention the output of the ./refpersys --version command in your message.

needs

The RefPerSys project needs more volunteers to actively contribute to it, and welcome any person having tried to build and run it (even some intern student in programming, if he/she is willing to contribute). At last, some team members are severely under-equiped and would welcome any 4 to 16 cores x86-64, Linux capable, working, PC with 32 gigabytes of RAM and at least a 240 Gb SSD disk. Sponsorship for traveling costs could also be welcome, to facilitate face to face meetings. Opportunities to present this project in face to face meetings are desired, and more generally a limited funding is welcome (but we have no legal organization for that in 2020). Mention potential relevant funding opportunities (e.g. HorizonEurope calls) or any technical issues in building or running it to us by email. Contact team@refpersys.org for more.

potential applications

The RefPerSys project welcome potential future applications (if in return they provide some sponsorship, contributions, or funding). Since it can be viewed as a high-level declarative programming environment based upon a metaprogramming and at end of 2020 some machine learning techniques, we believe it may become useful... However, the priority in 2020 is to generate most (hopefully all) of the C++ code of the RefPerSys system. Contact team@refpersys.org.

Of course, any real-world potential concrete application of RefPerSys (e.g. health sector, smart cities, smart grids, smart web, perhaps robot planning, civilian autonomous vehicles or drones, etc....) would require some support and a little bit of funding. We all are excited by this project, and we all want to have some read-world application for it and expect such applications to fund partly our research work.

An incomplete list of future applications (assuming a budget of a few hundreds k€ or US$ and close cooperation with other software developers and domain specific experts during a few years, with computer access to some industry or domain-specific open data or proprietary data or communication in open format) might include: