Code for Keras plays catch blog post
python qlearn.py- Generate figures
| public class Character { | |
| private Map<Stat, Integer> stats = new HashMap<Stat, Integer>(); | |
| private Map<Stat, Integer> statOffsets = new HashMap<Stat, Integer>(); | |
| private Job job; | |
| private LevelCurve levelCurve; | |
| private int level = 1; | |
| private int experience = 0; | |
| private final EquipmentInventory equipmentInventory = new EquipmentInventory(); | |
| public Character(Job job) { |
| Minor Algorithm: | |
| Input : <Cell : Array, row, col : dimensions, x : line, y : column> | |
| Output : <result : minor of the Array "Cell" at x, y > | |
| Best Choice Algorithm: | |
| Input : <Cell : Array, row, col : dimensions> | |
| Output : <result : number of the line or the column witch has a lot of Zero Element> | |
| class Vertex: | |
| def __init__(self, vertex): | |
| self.name = vertex | |
| self.neighbors = [] | |
| def add_neighbor(self, neighbor): | |
| if isinstance(neighbor, Vertex): | |
| if neighbor.name not in self.neighbors: | |
| self.neighbors.append(neighbor.name) | |
| neighbor.neighbors.append(self.name) |
Code for Keras plays catch blog post
python qlearn.pyThis is a basic implementation of a Q-Learning Agent. It performs moderately well, but does not solve the enviornment.
Hyperparameters are untuned for the most part. The agent could be made better if some time was put into tuning them.
| import java.util.Arrays; | |
| import java.util.Iterator; | |
| import java.util.RandomAccess; | |
| /** | |
| * Dynamic Array class (based on java.util.ArrayList) | |
| * for /r/JavaExamples - for tutorial purposes - | |
| * @author /u/Philboyd_Studge on 11/18/2015. | |
| */ |
| // Generates text based on an input string using the Markov Model outlined in Claude Shannon's seminal paper | |
| // A Mathematical Theory of Communication. The basic idea is that the next character printed to the console follows | |
| // a probability distributio given by the probability of that character following a string of length 'order' (kgram) | |
| // in the input text. This kgram is the string of length order that was printed last. | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.nio.charset.StandardCharsets; | |
| import java.nio.file.Files; | |
| import java.nio.file.Paths; |
| /** | |
| * | |
| */ | |
| package pt.mleiria.machinelearning.regression; | |
| /** | |
| * @author manuel | |
| * | |
| */ | |
| public class LinearRegression { |
| /* | |
| * To change this template, choose Tools | Templates | |
| * and open the template in the editor. | |
| */ | |
| import java.io.FileReader; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.net.URL; |