Questions tagged [implementation]

For questions about implementation of software/algorithms related to Artificial Intelligence.

Implementation of AI software/algorithms and methods can be complex. Each implementation may be unique, with its own advantages and disadvantages.

The implementation tag is a "how to" for both existing software, and application of AI methods to create new software.

For questions specifically limited to evaluating a framework, platform, plug-in, module, or software in general, use the "software-evaluation" tag.

105 questions
19
votes
2 answers

How to implement an "unknown" class in multi-class classification with neural networks?

For example, I need to detect classes for MNIST data. But I want to have not 10 classes for digits, but also I want to have 11th class "not a digit", so that any letter, any other type of image, or random noise would be classified as "not a digit".…
13
votes
4 answers

What does AI software look like, and how is it different from other software?

What does AI software look like? What is the major difference between AI software and other software?
Anatoly
  • 233
  • 3
  • 9
10
votes
4 answers

Are we technically able to make, in hardware, arbitrarily large neural networks with current technology?

If neurons and synapses can be implemented using transistors, what prevents us from creating arbitrarily large neural networks using the same methods with which GPUs are made? In essence, we have seen how extraordinarily well virtual neural networks…
10
votes
1 answer

How can the convolution operation be implemented as a matrix multiplication?

How can the convolution operation used by CNNs be implemented as a matrix-vector multiplication? We often think of the convolution operation in CNNs as a kernel that slides across the input. However, rather than sliding this kernel (e.g. using…
9
votes
5 answers

Why isn't ethics more integrated into current AI systems?

I am a PhD student in computer science, and currently creating a state of the art overview in applications done in Machine Ethics (a multidisciplinary field combining philosophy and AI, that looks at creating explicit ethical programs or agents). It…
Suzanne
  • 99
  • 5
8
votes
2 answers

How should I handle action selection in the terminal state when implementing SARSA?

I recently started learning about reinforcement learning. Currently, I am trying to implement the SARSA algorithm. However, I do not know how to deal with $Q(s', a')$, when $s'$ is the terminal state. First, there is no action to choose from in this…
Hai Nguyen
  • 552
  • 4
  • 14
8
votes
1 answer

What are other ways of handling invalid actions in scenarios where all rewards are either 0 (best reward) or negative?

I created an OpenAI Gym environment, and I would like to check the performance of the agent from OpenAI Baselines DQN approach on it. In my environment, the best possible outcome for the agent is 0 - the robot needs zero non-necessary resources to…
7
votes
2 answers

How is this Pytorch expression equivalent to the KL divergence?

I found the following PyTorch code (from this link) -0.5 * torch.sum(1 + sigma - mu.pow(2) - sigma.exp()) where mu is the mean parameter that comes out of the model and sigma is the sigma parameter out of the encoder. This expression is apparently…
7
votes
1 answer

Could an AI be killed in an infinite loop?

Currently, we use control flow statements (such as loops) to program the artificially intelligent systems. Could an AI be killed in an infinite loop (created by itself, for example, while manipulating its source code)? The question isn't baseless,…
Parth Raghav
  • 345
  • 1
  • 7
6
votes
1 answer

How are continuous actions sampled (or generated) from the policy network in PPO?

I am trying to understand and reproduce the Proximal Policy Optimization (PPO) algorithm in detail. One thing that I find missing in the paper introducing the algorithm is how exactly actions $a_t$ are generated given the policy network…
6
votes
4 answers

Is it possible to implement Asimov's Three Laws of Robotics?

Would it be possible to put Asimov's three Laws of Robotics into an AI? The three laws are: A robot (or, more accurately, an AI) cannot harm a human being, or through inaction allow a human being to be harmed1 A robot must listen to instructions…
Mithical
  • 2,885
  • 5
  • 27
  • 39
6
votes
0 answers

How is the rollout from the MCTS implemented in both of the AlphaGo Zero and the AlphaZero algorithms?

In the vanilla Monte Carlo tree search (MCTS) implementation, the rollout is usually implemented following a uniform random policy, that is, it takes random actions until the game is finished and only then the information gathered is backed up. I…
6
votes
2 answers

How is parallelism implemented in RL algorithms like PPO?

There are multiple ways to implement parallelism in reinforcement learning. One is to use parallel workers running in their own environments to collect data in parallel, instead of using replay memory buffers (this is how A3C works, for…
5
votes
2 answers

How fast is TensorFlow compared to self written neural nets?

I made my first neural net in C++ without any libraries. It was a net to recognize numbers from the MNIST dataset. In a 784 - 784 - 10 net with sigmoid function and 5 epochs with every 60000 samples, it took about 2 hours to train. It was probably…
Evator
  • 163
  • 2
  • 7
5
votes
1 answer

How to deal with different actions for different states of the environment?

I'm new to this AI/Machine Learning and was playing around with OpenAI Gym a bit. When looking through the environments, I came across the Blackjack-v0 environment, which is a basic implementation of the game where the state is the hand count of the…
1
2 3 4 5 6 7