16

Code in AI is not in principle different from any other computer code. After all, you encode algorithms in a way that computers can process them. Having said that, there are a few points where your typical "AI Code" might be different: A lot of (especially early) AI code was more research based and exploratory, so certain programming languages were favoured ...


9

Oliver Mason's answer is quite good, but I think it can be expanded upon a bit. I think there are extra factors that could be popularly interpreted as making AI code difficult to read (as compared to other code): AI code actually is more complex than most code that is written. When we work in AI, we often lose sight of this, but most code ever written does ...


6

The rendering process for browsers is very well defined, and has a very rigid definite ruleset where (virtually) every accountability is noted and handled. This is not optimal for Machine Learning, which works when we have a large pool of examples, and we don't know the ruleset; it will figure it out. Even if you were to train an Neural Network to process ...


5

This may be a much simpler explanation than you're looking for, but in Machine Learning Zero to Hero, Google engineer Laurence Moroney summarized it in a way that I thought was brilliant. Paraphrasing from a presentation slide: In traditional programming, you input rules and data and the program outputs answers. In machine learning, you input data and ...


5

The approach you describe is called neuromorphic computing and it's quite a busy field. IBM's TrueNorth even has spiking neurons. The main problem with these projects is that nobody quite knows what to do with them yet. These projects don't try to create chips that are optimised to run a neural network. That would certainly be possible, but the ...


4

One good way of differentiating modelling and implementation is to consider that models occupy a much higher level of abstraction. To continue with the mathematical example: even though experimental mathematics might be dependent on computation, the program can be considered as one possible realization of the necessary conditions of a more abstract ...


4

If you pick up a textbook on Neural Networks, you'll find that the simplest examples shown are ones that just implement an AND gate or something. They're trivial, probably fewer lines of code than what you have there. The bar to be an "artificial neural network" is pretty low... it certainly isn't the case that ANN's must be incredibly complicated with ...


4

If neurons and synapses can be implemented using transistors, I hope you are not talking about the neural networks which are currently winning all competitions in machine learning (MLPs, CNNs, RNNs, Deep Residual Networks, ...). Those were once used as a model for neurons, but they are only very loosely related to what happens in real brain cells. Spiking ...


4

The .weights seems to be the extension for a framework called "darknet" , you can read h5 files with Keras , however it if you really want to build an object detection framework there is no necessity to stick the darknet's weights. There are many pretrained models lying around in the web. Or else you could finetune a pretrained imagenet model in Keras which ...


4

The value $Q(s', ~\cdot~)$ should always be implemented to simply be equal to $0$ for any terminal state $s'$ (the dot instead of an action as second argument there indicates that what I just wrote should hold for any action, as long as $s'$ is terminal). It is easier to understand why this should be the case by dissecting what the different terms in the ...


3

tl;dr It helps to think that the channels dimension of a convolutional layer works like a fully connected layer (i.e. the layer computes the weighted sum over all channels). For a single pixel... Let's consider a single pixel (e.g. the top left pixel). This pixel has $C$ different values, where $C$ are the number of channels. In order to produce the result ...


3

In recent times different data science magazines and institutions have published their reviews of the top AI toolkits. In these reviews they tend to highlight the innovative features possessed by each platform as well as their reliability and ability to scale. Below are a some evaluations of AI platforms that I recommend you have a look at: KDnuggets ...


3

This is a hard to answer question because a truly correct answer would involve static analysis of a given Intelligence to determine whether it has the computational capability to generate a looping state (e.g. some state which reproduces itself in the next instance), and in fact whether these looping states can even exist in the given architecture. ...


3

I think your net should have the various actions as outputs, but I am not an expert in Deep Nets. I just think that that light form of multi-task learning might be better. The idea of multi-task learning is that a predictor predicting multiple variables (in this case the various Q(s,a1), Q(s,a2), ...) using mostly the same structure (varying only the output ...


3

In AI (but in general too, I believe), a simplification is that modeling is more akin to Mathematics (and related hard sciences involved, like Physics and... Computer Science), and implementation to Software Engineering. Let's take a concrete example, really outside of AI: Find the minimum value of a given polynomial, if it exists. The Mathematician will ...


3

No, there is no file type associated with AI projects in general. Your examples of Photoshop and Excel are specific corporate branded products. These store bespoke data that only works with those products (plus maybe a few converters that can read the files for competitor products). Even more general examples such as .jpg for images or .txt for text ...


3

Recently arxiv.org added a Code Tab towards the end of paper descriptions. Which contains links to both the official and community code. I don't know if this is the case for all the papers or not till know. But I'm sure it'll be extended to all the papers in a short while.


2

As far as I can tell (I've been doing searches here and there on and off since I saw this question a few hours ago) the closest we've gotten to 'simulations' on this is video-games, and to a degree movies, interestingly enough. I.e. entertainment media. Games like Portal, System Shock (with the AI 'Shodan'), and others give interpretations of what AI ...


2

From the description of the algorithm you linked to, it says to 'repeat until s is terminal'. So one would end the episode at that point and your intuition holds. Practically, if one was implementing a reward function where a specific reward is associated with the end of the episode such as "r(robot ran into a wall) = -100" then one can imagine that there ...


2

This is necessarily a high-level answer, and highly speculative, but I've been thinking on this question, and here are my thoughts: Implementing ethical algorithms requires a mathematical basis for philosophy because computers are difference engines After Russell & Whitehead's famous failure, and Gödel's incompleteness theorem, this would seem to be ...


2

One of the more standard assumptions when first introducing new students to search algorithms (like Depth-First Search, Breadth-First Search which you've also likely heard about or will hear about soon, etc.) is indeed that our goal is to find some sort of solution, and only find one. If our intention is to find just a single solution, then yes, you will ...


2

Answers: Generally its the former. The next layer would learn at each filter how to merge the channels of the previous layer, that is why in a 2D convolution the kernel is a 3-dimensional tensor. But the number of parameters is $nmc_ic_{i+1}$ at the $i^{th}$ layer (this is ignoring bias). lets assume all channels are $O(c)$ then the spatial complexity ...


2

In UCT, the value of Q(vi) / N(vi) is bounded between 0 and 1. Normally when applying MCTS to 2-player games, what happens is the following: N(vi) corresponds to the total number of games simulated in node vi. Q(vi) corresponds to the total number of games simulated and won in node vi. So in each simulation Q(vi) will add +1 to the winning player and +0 to ...


2

AI has been redefined recently to machine learning. All programming except machine learning (and we'll come back to this) is embodying human knowledge in terms a computer can follow. EG A text editor has user interface rules, user expectations, a contract with the OS that it has to follow. A programmer puts it all together. This applies to text editors, ...


2

The issue is that in your list comprehension in def V_pi(state) you have return sum(prob * (reward + mdp.discount*V[newState]) for prob, reward, newState in mdp.succProbReward(state)) whereas with the way you have defined the succProbReward output, it should be return sum(prob * (reward + mdp.discount*V[newState]) for newState, prob, reward in ...


2

Yes, it is the state of the memory; this would mainly involve variables, since the code would be in ROM. Since it is only 128 bytes in size, the screen memory would also not be included in this. The idea is that all information relevant to the game is captured in these 128 bytes; they represent the state of the game world at any given time. Movements of the ...


2

Typically you would need to save the network weights, hyper-parameters and the replay buffer if you wanted to stop training and then come back at a later date and carry on training. Usually, I do this by writing it all as a class in Python (the agent, the memory buffer, hyper-parameters etc.) and saving the final object with Pickle. Looking at your code, the ...


1

The paper Dota 2 with Large Scale Deep Reinforcement Learning goes into greater detail than the initial blog posts. They call their distributed training framework Rapid, which is also used in some of their robotics work, such as the paper Learning Dexterous In-Hand Manipulation, where they discuss a smaller scale deployment of Rapid (as compared to Dota2/...


1

OpenAI have a post on that: https://openai.com/blog/openai-five/ They use a myriad of rollout workers that collect data for 60 seconds and push that data to a GPU cluster where gradients are computed for batches of 4096 observations which are then averaged. PPO is actually designed to allow this kind of parallelisation as it uses trajectory segments with a ...


1

We use the LIFO queue, i.e. stack, for implementation of the depth-first search algorithm because depth-first search always expands the deepest node in the current frontier of the search tree. The search proceeds immediately to the deepest level of the search tree, where the nodes have no successors. As those nodes are expanded, they are dropped from the ...


Only top voted, non community-wiki answers of a minimum length are eligible