19

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 ...


10

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 ...


8

I wanted to know how the performance of my net would be compared to the same in Tensor Flow. Not to specific but just a rough aproximation. This is very hard to answer in specific terms because benchmarking is very hard and is often wrong. The main point of TensorFlow as I see it is to make it easier for you to use a GPU and further allows you to use a ...


7

The most challenging part is this section of the first law: or through inaction allow a human being to be harmed Humans manage to injure themselves unintentionally in all kinds of ways all the time. A robot strictly following that law would have to spend all its time saving people from their own clumsiness and would probably never get any useful work ...


7

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 ...


7

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 ...


6

Defining "harm" and in particular, "allowing harm via inaction" in any meaningful way would be difficult. For example, should robots spend all their time flying around attempting to prevent humans from inhaling passive smoke or petrol fumes? In addition, the interpretation of 'conflict' (in either rule 2 or 3) is completely open-ended. Resolving such ...


6

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 ...


5

1) Is there any way to set the initial Q-values for the actions? You can generally do this, but you cannot specify specific weights for specific actions in specific states. Not through the network weights directly, at least. That would defeat the purpose of using backpropagation to optimize the weights and find the optimal parameters and Q-values. 2) Is ...


5

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. ...


5

Overlap between AI and "Game AI" Nowadays, if you search for AI online, you will find a lot of material about machine learning, natural language processing, intelligent agents and neural networks. These are not the whole of AI by any means, expecially in a historical context, but they have recently been very successful, there is lots of published ...


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 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 ...


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 ...


3

The .weights seems to be the extension for a framework called "darknet". You can read .h5 files with Keras. However, if you really want to build an object detection framework, there is no necessity to stick to the darknet's .weights files. There are many pretrained models on the web. Or else you could fine-tune a pre-trained ImageNet model in Keras,...


3

The usual way to implement this would be to add the new class with data examples. Some things you need to address: Sourcing new data for your "other" class. Ensuring the amount and variation of data in "other" class examples matches how the predictor will be used. Code examples for this are not necessary, as you would just use the same network design as ...


3

A lot. There are all these optimizations that we might not have thought of like combining layers, functions, etc. I am a pytorch guy though, its clean and doesn't get in your way like tensorflow does.


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

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 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

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

Why are we allowed to convert the Bellman equations into update rules? There is a simple reason for this: convergence. The same chapter 4 of the same book mentions it. For example, in the case of policy evaluation, the produced sequence of estimates $\{v_k\}$ is guaranteed to converge to $v_\pi$ as $k$ (i.e. the number of iterations) goes to infinity. There ...


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

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

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

While a single transistor could approximate the basic function of a single neuron, I cannot agree that any electronic element could simulate the synapses/axons. Transistors are etched on a flat surface, and could be interconnected only to adjacent or close by transistors. Axons in the brain span huge distances (compared to the size of the neuron itself), and ...


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

Backpropagation isn't too much more complicated, but understanding it well will require a bit of mathematics. This tutorial is my go-to resource when students want more detail, because it includes fully worked through examples. Chapter 18 of Russell & Norvig's book includes pseudocode for this algorithm, as well as a derivation, but without good examples....


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