How to train a tfjs model on logic gates

Using tensorflow for JavaScript to train an artificial intelligence model to effectively evaluate and predict expected output of a logic gate given two inputs.
training data is sourced from a two dimentional array truth table
// logic truth table
// -----------------
const truthTable = [
    [
        [[[0, 0], [0, 1], [1, 1], [1, 1]],
        [[0], [1], [1], [1]]]
    ]
];
The first pairs of numbers are the input proceeded by the output

Comments

Popular posts from this blog

How to wait for a promise within a loop block

Tar basic commands to store and extract files

How to train a tfjs model to play breakout game

FlappingBird Postmortem (JS13K)

Installing and using 'cowsay' with fortune