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.

37 lines
1.2 KiB

5 years ago
## neuron
### 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: { questions: 'what is ounces?', responses: [
'Ounce, unit of weight in the avoirdupois system',
'equal to 1/16 pound (437 1/2 grains)'
] },
what_is_mud_dauber: { questions: 'what is Mud dauber', responses: [
'Mud dauber is a name commonly applied to a number of wasps'
] }
},
orders: {
shutdown: { orders: 'shutdown!', responses: ['Yes Sr!'] },
quote_something: { orders: 'Quote something!', responses: [
'Pursue what catches your heart, not what catches your eyes.'
] }
}
}
```