2018/10/31
How to build your own AlphaZero AI using Python and Keras
https://medium.com/applied-data-science/how-to-build-your-own-alphazero-ai-using-python-and-keras-7f664945c188?mkt_tok=eyJpIjoiTkRFM1lXUmlOR1poWW1JMyIsInQiOiIyMWlrbVNnOUFpNjR0QUd4RUp4ajBSUEl3aGI0bWtyVFpzcnpoK2U4Wkl1TG0yd2ZLeUlkSFVLNUVMM3Vka0ZxMVk2c2lIaUxJeEdCbjNNckk4WTFadytiZ0Yzekpva3Y1VVQ0XC90R2dQaUZtYk1iVFwvV3ZzbjhkM3RKWnNXQnpDIn0%3D
Step by step instructions on the Alpha Go prototype.
Step by step instructions on the Alpha Go prototype.
2018/10/30
deep learning and reinforcement learning
Artificial Intelligence: What's The Difference Between Deep Learning And Reinforcement Learning?
https://www.forbes.com/sites/bernardmarr/2018/10/22/artificial-intelligence-whats-the-difference-between-deep-learning-and-reinforcement-learning/#52141bd271e1
This is a good article, easy for beginners.
This is a good article, easy for beginners.
2018/10/12
human perception
- This is analogous to the way humans and animals perceive the world: after observ- ing a scene for a few seconds, a human can remember which abstract objects were present in it (bicycle, tree) but can’t remember the specific appearance of these objects. In fact, if you tried to draw a generic bicycle from memory, chances are you couldn’t get it even remotely right, even though you’ve seen thousands of bicycles in your lifetime (see, for example, figure 5.28). Try it right now: this effect is absolutely real. You brain has learned to completely abstract its visual input—to transform it into high-level visual concepts while filtering out irrelevant visual details—making it tre- mendously difficult to remember how things around you look.
From "Deep Learning with Python"
2018/08/21
Building your chatbot with RASA(tutorial 2)
This tutorial continues on my previous post, however, includes TensorFlow into the embedding.
Just as the page https://rasa.com/docs/core/quickstart/
language: en
pipeline: tensorflow_embedding
2) Then we add another intent bye to the following three files
a) make train
b) make run
The detailed commands are :
train:
$(PYTHON) -m rasa_nlu.train -c nlu_config.yml --data trainingData.md -o models --fixed_model_name nlu --project current --verbose
run:
$(PYTHON) -m rasa_core.run -d models/dialogue -u models/current/nlu
The GitHub link is https://github.com/chaowu2009/sample_chatbot_RASA
Just as the page https://rasa.com/docs/core/quickstart/
Of course you want your bot to understand real language, not just structured input.An interpreter is responsible for parsing messages. It performs the Natural Language Understanding (NLU) and transforms the message into structured output. In this example we are going to use Rasa NLU for this purpose.1) Here we first add nlu_config.yml file as following:
In Rasa NLU, we need to define the user messages our bot should be able to handle in the Rasa NLU training data format.
language: en
pipeline: tensorflow_embedding
2) Then we add another intent bye to the following three files
trainingData.md3) We created a Makefile, including make train and make run.
stories.md
domain.yml
a) make train
b) make run
The detailed commands are :
train:
$(PYTHON) -m rasa_nlu.train -c nlu_config.yml --data trainingData.md -o models --fixed_model_name nlu --project current --verbose
run:
$(PYTHON) -m rasa_core.run -d models/dialogue -u models/current/nlu
The GitHub link is https://github.com/chaowu2009/sample_chatbot_RASA
Building your chatbot with RASA (tutorial 1)
I was recently introduced to RASA, a new chat bot which immediately captured my attention after playing with it.
Here I am using Python framework , following their own example as https://rasa.com/docs/core/quickstart/ and hopefully you can learn to practice it yourself.
However, I do divert from that a little bit to provide a better flow based on my experience.
Basically a conversation has question/answers. We just need make the bot understand our question and then provide a proper answer. Here is one example:
If we say: Hello/Hey/Hi/Good morning/Good afternoon/Hi, Hi/ Hi, Bot/, we are greeting the bot. The bot should understand this question ( here in RASA, it is called intent) and answer accordingly. The bot can answer as simple as "hey" or "hey, nice to meet you", or "hey, what can I do for you, etc" .
So we need build a system which understand the "intent", "action" based on the intent, then "answer" the human.
Here is the steps:
1) create the domain.yml file, which defines intent, actions, templates
intents:
- greet
actions:
- utter_greet
templates:
utter_greet:
- "Hello. Can I help you?"
2) create stories.md file, which define the story line
## general greetings
* greet
- utter_greet
3) training the model in the command line
python -m rasa_core.train -d domain.yml -s stories.md -o models/dialogue
4) run the chatbot in the command line
python -m rasa_core.run -d models/dialogue
5) or run the chatbot in non-stop mode as in the RASA tutorial
python sample_chatbot.py
The GitHub repo is https://github.com/chaowu2009/sample_chatbot_RASA
Here I am using Python framework , following their own example as https://rasa.com/docs/core/quickstart/ and hopefully you can learn to practice it yourself.
However, I do divert from that a little bit to provide a better flow based on my experience.
Basically a conversation has question/answers. We just need make the bot understand our question and then provide a proper answer. Here is one example:
If we say: Hello/Hey/Hi/Good morning/Good afternoon/Hi, Hi/ Hi, Bot/, we are greeting the bot. The bot should understand this question ( here in RASA, it is called intent) and answer accordingly. The bot can answer as simple as "hey" or "hey, nice to meet you", or "hey, what can I do for you, etc" .
So we need build a system which understand the "intent", "action" based on the intent, then "answer" the human.
Here is the steps:
1) create the domain.yml file, which defines intent, actions, templates
intents:
- greet
actions:
- utter_greet
templates:
utter_greet:
- "Hello. Can I help you?"
2) create stories.md file, which define the story line
## general greetings
* greet
- utter_greet
3) training the model in the command line
python -m rasa_core.train -d domain.yml -s stories.md -o models/dialogue
4) run the chatbot in the command line
python -m rasa_core.run -d models/dialogue
5) or run the chatbot in non-stop mode as in the RASA tutorial
python sample_chatbot.py
The GitHub repo is https://github.com/chaowu2009/sample_chatbot_RASA
2018/08/15
technology forward
I am dedicated this space to my technology passion and will write frequently.
I am living in Columbia, Maryland.
I am living in Columbia, Maryland.
Subscribe to:
Posts (Atom)
How to Supercharge Your Python Classes with Class Methods
How to Supercharge Your Python Classes with Class Methods | by Siavash Yasini | May, 2024 | Towards Data Science As we just mentioned, a c...
-
https://rszalski.github.io/magicmethods/ __init__ __repr__ __getattr__ __setattr__ __call__(self, [args...]) context manager class Closer: ...
-
What is a Generalised Additive Model? What are Generalised Additive Models? | Towards Data Science 5.3 GLM, GAM and more | Interpretable M...
-
Five basic elements about reinforcement learning: agent, state, environment, policy, reward. Here is an example https://builtin.com/data-...
-
Use Celery Celery is an asynchronous task queue based on distributed message passing to distribute workload across machines or threads. A c...
-
• ENERGY CONSUMPTION https:// www.drivendata.org /competitions/51/electricity-prediction-machine-learning/page/101/ • TAXI ROUTE ...