I found this image in a book and would like to recreate it. The nodes are no problem, but I cannot find the way to recreate these arrows. The figure doesn't have to be the same, but has to look something like it.

Screenshot of the image


Something like this, perhaps?

\documentclass[border = 4pt, tikz]{standalone}

\tikzstyle{myarrow} = [line width = 1mm, draw = gray!40, -triangle 45, postaction={draw, line width = 2mm, shorten >=3mm, -}]


\begin{tikzpicture}[outer sep = 2pt]
  \node[trapezium, trapezium angle = 60, minimum width = 1cm, draw, align = center, fill = cyan!10] (agent) {Agent};

  \node[below = of agent, draw, rounded corners, minimum width = 1cm, minimum height = 0.8cm, fill = green!10] (environment) {Environment};

  \draw[myarrow, rounded corners] (environment.west) -- ([xshift = -1cm]environment.west) |- (agent) 
  node[pos = 0.25, left, align = center]{State: s \\ \color{red}{Reward : r}};

  \draw[myarrow, rounded corners] (agent.east) -- ([xshift = 1.5cm]agent.east) |- (environment) 
  node[pos = 0.25, right, align = center]{Actions: a};



enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.