Skip to Content
R Deep Learning Cookbook
book

R Deep Learning Cookbook

by PKS Prakash, Achyutuni Sri Krishna Rao
August 2017
Intermediate to advanced
288 pages
8h 6m
English
Packt Publishing
Content preview from R Deep Learning Cookbook

How to do it...

The section provide steps for how to set up Q-learning:

  1. Define 16 states:
states <- c("s1", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15", "s16") 
  1. Define four actions:
actions<- c("up", "left", "down", "right") 
  1. Define the transitionStateAction function, which can simulate the transitions from one state s to another state s' using an action a. The function takes in the current state s and selected action a, and it returns the next state s' and corresponding reward r'. In case of constrained action, the next state returned is the current state s and the existing reward r:
 transitionStateAction<- function(state, action) { # The default state is the existing state in case of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Deep Learning with R Cookbook

Deep Learning with R Cookbook

Swarna Gupta, Rehan Ali Ansari, Dipayan Sarkar
The Deep Learning with Keras Workshop

The Deep Learning with Keras Workshop

Matthew Moocarme, Mahla Abdolahnejad, Ritesh Bhagwat
Deep Learning for Chest Radiographs

Deep Learning for Chest Radiographs

Yashvi Chandola, Jitendra Virmani, H.S Bhadauria, Papendra Kumar

Publisher Resources

ISBN: 9781787121089Supplemental Content