Public
Edited
May 8, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
simLine = actorCriticSim(this, conLine, {states: lineStates, rewards: lineRewards, actions: lineActions, parameters: {alpha: 0.5, beta: 0.5, gamma: 0.8, epsilon: 0.2}})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
simGrid = actorCriticSim(this, conGrid, {states: gridStates, rewards: gridRewards, actions: gridActions, parameters: {alpha: 0.5, beta: 0.5, gamma: 0.8, epsilon: 0.2}})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
lineStates = ({
rows: 1,
columns: 10,
beginStates: [[0, 0]],
endStates: [[0, 9]],
wallStates: [],
})
Insert cell
lineRewards = ({
moveReward: 0,
edgeReward: 0,
wallReward: 0,
stateRewards: [{reward: 100, states: lineStates.endStates}],
})
Insert cell
lineActions = ({
actions: [
actorCriticEnum.ACTIONS.LEFT,
actorCriticEnum.ACTIONS.RIGHT,
],
});
Insert cell
gridStates = ({
rows: 5,
columns: 6,
beginStates: [[0, 0]],
endStates: [[0, 5]],
wallStates: [[0, 2], [1, 2], [2, 2]],
})
Insert cell
gridRewards = ({
moveReward: -1,
edgeReward: -5,
wallReward: -5,
stateRewards: [{reward: 100, states: gridStates.endStates}, {reward: -100, states: [[3, 5]]}],
})
Insert cell
gridActions = ({
actions: [
actorCriticEnum.ACTIONS.LEFT,
actorCriticEnum.ACTIONS.UP,
actorCriticEnum.ACTIONS.RIGHT,
actorCriticEnum.ACTIONS.DOWN,
],
});
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more