Inputs
-
sentence
-
search
-
return, when searched
-
return, when not searched
Outputs
Neuron type
Best algorithm has been found - locked
Patterns
Pattern |
Input |
Output |
1. |
sentence: |
Abcde |
search: |
c |
return, when searched: |
Y |
return, when not searched: |
N |
|
|
2. |
sentence: |
Hi AI. |
search: |
Hi |
return, when searched: |
Hi. |
return, when not searched: |
What you want? |
|
|
3. |
sentence: |
12345 |
search: |
9 |
return, when searched: |
1 |
return, when not searched: |
0 |
|
|
4. |
sentence: |
12345 |
search: |
5 |
return, when searched: |
1 |
return, when not searched: |
0 |
|
|
Applicable neurons
-
Position
-
-1
-
IF
-
a = b
-
Destroyed building (windows)
-
character d
-
Midpoint (2d)
-
is x < 0 ?
-
convert seconds into MM:SS
-
select count (A, B, C)
Algorithm
Test
Code made by AI:
/**
* Position: Search position substring of string
*
* @param x1 MyString
* @param x2 FindMe
* @return {Array}
*/
function neuron523(x1, x2)
{
return [x1.toString().indexOf(x2.toString())];
}
/**
* character -:
*
* @return {Array}
*/
function neuron511()
{
return['-'];
}
/**
* 1:
*
* @return {Array}
*/
function neuron501()
{
return [1];
}
/**
* Connect - two inputs:
*
* @param x1 Variable A
* @param x2 Variable B
* @return {Array}
*/
function neuron520(x1, x2)
{
return [x1.toString()+x2.toString()];
}
/**
* -1:
*
* @return {Array}
*/
function neuron574()
{
var outputs = [];
arr = neuron511();
outputs[0] = arr[0];
arr = neuron501();
outputs[1] = arr[0];
arr = neuron520(outputs[0], outputs[1]);
outputs[2] = arr[0];
return[outputs[2]];
}
/**
* IF: IF a THEN b ELSE c;
*
* @param x1 condition (1/0)
* @param x2 variable for 1
* @param x3 variable for 0
* @return {Array}
*/
function neuron579(x1, x2, x3)
{
return [(x1) ? x2 : x3];
}
/**
* when sentence contains a, return b, else return c:
*
* @param x1 sentence
* @param x2 search
* @param x3 return, when searched
* @param x4 return, when not searched
* @return {Array}
*/
function neuron666(x1, x2, x3, x4)
{
var outputs = [];
outputs[0] = x1;
outputs[1] = x2;
outputs[2] = x3;
outputs[3] = x4;
arr = neuron523(outputs[0], outputs[1]);
outputs[4] = arr[0];
arr = neuron574();
outputs[5] = arr[0];
arr = neuron523(outputs[5], outputs[4]);
outputs[6] = arr[0];
arr = neuron579(outputs[6], outputs[2], outputs[3]);
outputs[7] = arr[0];
return[outputs[7]];
}
Code made by AI: