/binary_neurons_network

Binary Neurons Network (BNN). This is an attempt to create artificial intelligence in the original meaning: AGI, Strong AI, HLAI, True AI.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Binary Neurons Network (BNN)

This is an attempt to create AI but not AI in the modern sense of the word.
It is AI in the original meaning coinciding with the meanings of the following synonyms:

  • Artificial general intelligence (AGI);
  • Strong artificial intelligence (Strong AI);
  • Human-level artificial intelligence (HLAI);
  • True artificial intelligence (True AI).

Looking for a sponsor

Usage

#include <unistd.h>
#include <iostream>

#include "common/architecture.h"

int main()
{
    constexpr bnn_settings bs
    {
        .quantity_of_neurons_in_power_of_two = 12, // 2^12=4096
        .input_length = 31,
        .output_length = 8,
        .motor_binaries_per_motor = 8,
        .random_size_in_power_of_two = 22,
        .quantity_of_threads_in_power_of_two = 1, // 2^1=2
    };

    bnn::architecture bnn(bs);
    bnn.start();
    while(!bnn.is_active());
    bool stop{false};
    std::thread([&stop](){ sleep(1); stop = true; }).detach();

    while(!stop)
    {
        static char input[bs.input_length + 1]{};
        static char output[bs.output_length + 1]{};
        static bool value;

        for (u_word i = 0; i < bs.input_length; i++)
        {
            value = rand() % 2;

            // Put data in BNN
            bnn.set_input(i, value);

            input[i] = value + 48;
        }

        for (u_word i = 0; i < bs.output_length; i++)
        {
            // Get data from BNN
            value = bnn.get_output(i);

            output[i] = value + 48;
        }

        std::cout << "input=" << input << " output=" << output << std::endl;
        usleep(100000);
    }

    bnn.stop();

    return 0;
}

CMake build

Build and run the minimal example with helper

run.sh

Example projects for BNN

Author

Ilya Shishkin
mailto:cortl@8iter.ru

Achievements

Links

License

This project is licensed under the GPL v3.0 - see the LICENSE file for details