artificial-intelligence

Finding the best move using MinMax with Alpha-Beta pruning

▼魔方 西西 提交于 2019-12-13 11:36:49
问题 I'm working on an AI for a game and I want to use the MinMax algorithm with the Alpha-Beta pruning . I have a rough idea on how it works but I'm still not able to write the code from scratch, so I've spend the last two days looking for some kind of pseudocode online. My problem is that every pseudocode I've found online seems to be based on finding the value for the best move while I need to return the best move itself and not a number. My current code is based on this pseudocode (source)

Memory Usage During running a Deep learning CNN Model in Colab

若如初见. 提交于 2019-12-13 11:12:19
问题 I am conducting a research which requires me to know the memory used during run time by the model when i run a deep learning model(CNN) in google colab. Is there any code i can use to know the same .Basically I want to know how much memory has been used in total model run .(after all epoch has been complete). I am coding in python Regards Avik 回答1: As explained in this post and my own observations, Tensorflow always tries to allocate the entire memory , no matter how small or big is your

What are the possibilities for self-modification of Java code?

元气小坏坏 提交于 2019-12-13 09:04:48
问题 Could you list the possibilities for Java code to modify itself? The scenario in which this is going to be used is a learning program. In response to user input the program learns a new algorithm: it looks up the existing code base for a similar algorithm if no similar algorithm is in the code base, the program just adds a new algorithm if a similar algorithm exists, the program (perhaps with some help from the user) modifies the existing algorithm to be able to serve both the old purpose and

LUIS API - Retrieve all endpoint utterances and its scores

泄露秘密 提交于 2019-12-13 03:48:56
问题 I have been searching the past few days how to retrieve the endpoint utterances and its scores for a dashboard I am working with. Problem is I'm lost with the APIs, there seems to be many, but I cannot find the exact one that fits my need. In this API documentation here, there is one that gets example utterances. What I would want to get is the actual endpoint utterances. Anyone can point me where to find the API to use? Thanks in advance. 回答1: @Jeff, actually in that API docs that you linked

tflight graph created wrongly

和自甴很熟 提交于 2019-12-13 03:09:10
问题 I have the following frozen inference graph. This is for semantic segmentation using Deeplab (download graph here). I converting this graph to tflite format tflite_convert \ --output_file=test2.lite \ --graph_def_file=frozen_inference_graph_3mbvoc.pb \ --input_arrays=ImageTensor \ --output_arrays=SemanticPredictions \ --input_shapes=1,450,600,3 \ --inference_input_type=QUANTIZED_UINT8 \ --inference_type=FLOAT \ --mean_values=128 \ --std_dev_values=128 After conversion the graph looks as

MiniMax with Alpha Beta Pruning for Othello not working

穿精又带淫゛_ 提交于 2019-12-13 02:37:16
问题 I have the following implementation of a alpha beta minimax for an othello (reversi) game. Somehow, this never really returns the proper action to take. It seems to return the default action I put in the function (0, 0) and the secondary value of -32768, which means it got pruned at the MAX subroutine. Any tips on what I can improve with this and how I can fix this problem? Note: I've identified the successors being returned properly for the most part. The max depth for now is 8. Computer

Learning about game development, any books recommended? [closed]

我们两清 提交于 2019-12-12 22:08:34
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I want to write some games, but I don't have any game development experience. Any books are recommended? Is this necessary to have a

Why does my GradientDescentOptimizer produce NaN?

▼魔方 西西 提交于 2019-12-12 21:51:43
问题 I'm currently working on reworking Professor Andrew Ng's "Machine Learning" course assignments from Coursera, and I got stuck in the Logistic Regression portion. filename = 'data/ex2data1.txt' data = np.loadtxt(filename, delimiter = ",", unpack = True) # Data matrices xtr = np.transpose(np.array(data[:-1])) ytr = np.transpose(np.array(data[-1:])) # Initial weights W = tf.Variable(tf.zeros([2,1], dtype = tf.float64)) # Bias b = tf.Variable(tf.zeros([1], dtype = tf.float64)) # Cost function y_

Shortest path algorithm (eg. Dijkstra's) for 500+ waypoints/nodes?

江枫思渺然 提交于 2019-12-12 21:18:41
问题 I've asked about a shortest path algorithm here: 2D waypoint pathfinding: combinations of WPs to go from curLocation to targetLocation (To understand my situation, please read that question as well as this one.) It appears that the Dijkstra shortest path algorithm would be able to do what I need. However, I have about 500 to 1000 nodes in my routes map. The implementations I have seen so far limited the amount of nodes to something under 50. My question is: should I still use the Dijkstra

A* to recognize it's impossible to get to the goal

主宰稳场 提交于 2019-12-12 19:57:03
问题 I implemented A* for the 8 puzzle problem pretty much word for word to the pseudo code in the wiki article but even though I have closed I still get infinite runtime on boards that should fail. It seems that the rate of opening new nodes is larger than closing them, since for each node about 1-4 new nodes are added to the open but only one node is moved from open to closed . So what can be done to recognize that a given starting board has no path to the goal without waiting forever? This is