You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.2 KiB

## Neuron
4 years ago
### Instructions
Create a function called `neuron` that allows your AI/bot to learn how to data shape a given
dataset into an object so that it can better navigate the data.
### Example
```js
neuron([
'Questions: what is ounces? - Response: Ounce, unit of weight in the avoirdupois system',
'Questions: what is ounces? - Response: equal to 1/16 pound (437 1/2 grains)',
'Questions: what is Mud dauber - Response: Mud dauber is a name commonly applied to a number of wasps',
'Orders: shutdown! - Response: Yes Sr!',
'Orders: Quote something! - Response: Pursue what catches your heart, not what catches your eyes.'
])
// output
{
questions: {
what_is_ounces: { question: 'what is ounces?', responses: [
4 years ago
'Ounce, unit of weight in the avoirdupois system',
'equal to 1/16 pound (437 1/2 grains)'
] },
what_is_mud_dauber: { question: 'what is Mud dauber', responses: [
4 years ago
'Mud dauber is a name commonly applied to a number of wasps'
] }
},
orders: {
shutdown: { order: 'shutdown!', responses: ['Yes Sr!'] },
quote_something: { order: 'Quote something!', responses: [
4 years ago
'Pursue what catches your heart, not what catches your eyes.'
] }
}
}
```