artificial-intelligence

How do Markov Chain Chatbots work?

好久不见. 提交于 2019-12-02 13:48:23
I was thinking of creating a chatbot using something like markov chains, but I'm not entirely sure how to get it to work. From what I understand, you create a table from data with a given word and then words which follow. Is it possible to attach any sort of probability or counter while training the bot? Is that even a good idea? The second part of the problem is with keywords. Assuming I can already identify keywords from user input, how do I generate a sentence which uses that keyword? I don't always want to start the sentence with the keyword, so how do I seed the markov chain? Nocker I

Best programming based games [closed]

╄→尐↘猪︶ㄣ 提交于 2019-12-02 13:46:18
Back when I was at school, I remember tinkering with a Mac game where you programmed little robots in a sort of pseudo-assembler language which could then battle each other. They could move themselves around the arena, look for opponents in different directions, and fire some sort of weapon. Pretty basic stuff, but I remember it quite fondly, even if I can't remember the name. Are there any good modern day equivalents? The game in question was definitely Robowar for the Mac. My son had a lot of fun with it and went on to program real robots. As mentioned earlier by Proud, there is a wiki page

Number equality test fails in CLIPS pattern matching?

六眼飞鱼酱① 提交于 2019-12-02 12:32:44
问题 I have this following rule in my CLIPS file: (defrule check-final (declare (salience 12)) ?scnt <- (set-count (value ?v) (class ?c)) (test (= ?v ?*total*)) => (printout T ?*total* " == " ?v crlf) ) And I get the following strange output: CLIPS>(run) 14 == 9 5 == 2 How is this possible ???? 回答1: Pattern matching for this rule occurs whenever the fact set-count is asserted or modified. The rule is fired some time afterwards, during the call to run . These two processes can be widely separated

Number equality test fails in CLIPS pattern matching?

你。 提交于 2019-12-02 05:20:53
I have this following rule in my CLIPS file: (defrule check-final (declare (salience 12)) ?scnt <- (set-count (value ?v) (class ?c)) (test (= ?v ?*total*)) => (printout T ?*total* " == " ?v crlf) ) And I get the following strange output: CLIPS>(run) 14 == 9 5 == 2 How is this possible ???? Pattern matching for this rule occurs whenever the fact set-count is asserted or modified. The rule is fired some time afterwards, during the call to run . These two processes can be widely separated in time. The value of ?*v* can of course change during that long period of time. The key is to realize that

Parse speech output to a JSON to call Application API

半世苍凉 提交于 2019-12-02 02:08:55
问题 Here is an idea: We have web applications with exposed restful APIs which accepts json. Now how about using google speech APIs to take user voice input convert it to text then somehow translate that text to JSONs required by APIs and then call those application APIe with JSON? Is there any. Library to translate text to a specified JSon format? Has anybody used this approach? 回答1: This is called "intent analysis". There are such libraries, for example RASA For example you input is "show me

Parse speech output to a JSON to call Application API

北慕城南 提交于 2019-12-01 23:24:48
Here is an idea: We have web applications with exposed restful APIs which accepts json. Now how about using google speech APIs to take user voice input convert it to text then somehow translate that text to JSONs required by APIs and then call those application APIe with JSON? Is there any. Library to translate text to a specified JSon format? Has anybody used this approach? This is called "intent analysis". There are such libraries, for example RASA For example you input is "show me chinese restaurants". The output would be { "text": "show me chinese restaurants", "intent": "restaurant_search

Cost function always returning zero for a binary classification in tensorflow

核能气质少年 提交于 2019-12-01 20:49:59
I have written the following binary classification program in tensorflow that is buggy. The cost is returning to be zero all the time no matter what the input is. I am trying to debug a larger program which is not learning anything from the data. I have narrowed down at least one bug to the cost function always returning zero. The given program is using some random inputs and is having the same problem. self.X_train and self.y_train is originally supposed to read from files and the function self.predict() has more layers forming a feedforward neural network. import numpy as np import

TensorFlow 0.12 Model Files

风格不统一 提交于 2019-12-01 20:24:24
问题 I train a model and save it using: saver = tf.train.Saver() saver.save(session, './my_model_name') Besides the checkpoint file, which simply contains pointers to the most recent checkpoints of the model, this creates the following 3 files in the current path: my_model_name.meta my_model_name.index my_model_name.data-00000-of-00001 I wonder what each of these files contains. I'd like to load this model in C++ and run the inference. The label_image example loads the model from a single .bp file

Calculate the error using a sigmoid function in backpropagation

旧城冷巷雨未停 提交于 2019-12-01 18:17:52
I have a quick question regarding backpropagation. I am looking at the following: http://www4.rgu.ac.uk/files/chapter3%20-%20bp.pdf In this paper, it says to calculate the error of the neuron as Error = Output(i) * (1 - Output(i)) * (Target(i) - Output(i)) I have put the part of the equation that I don't understand in bold. In the paper, it says that the Output(i) * (1 - Output(i)) term is needed because of the sigmoid function - but I still don't understand why this would be nessecary. What would be wrong with using Error = abs(Output(i) - Target(i)) ? Is the error function regardless of the

Can a transposition table cause search instability

▼魔方 西西 提交于 2019-12-01 16:58:11
问题 I'm writing a chess engine and recently added a transposition table. When running a few tests, I found that although the search still returned the same best move, the value of the move (how good it is for the maximizing player) fluctuated. Is this normal behavior for a transposition table? I remember reading that a transposition table can cause search instability. Is this what that means? So is this a normal occurrence or a serious bug in my code? 回答1: Yes, transposition tables introduce