\begin{tikzpicture}[ block/.style={rectangle, draw, rounded corners, minimum width=2cm,…
- User
\begin{tikzpicture}[ block/.style={rectangle, draw, rounded corners, minimum width=2cm, minimum height=1cm},
=Stealth ]
% Nodes \node[block] (agent) {Agent}; \node[block, below=2cm of agent] (environment) {Environment};
% Arrows \draw[->] () -- ++(1.5,0) |- node[right, pos=0.75] {action } (); \draw[->] () -- ++(-1.5,0) |- node[left, pos=0.25] {state } (); \draw[->] () -- ++(-0.75,0) |- node[left, pos=0.75] {reward } ();
Assistant
latex\begin{tikzpicture}[ block/.style={rectangle, draw, rounded corners, minimum width=2cm, minimum height=1cm}, >=Stealth ] % Nodes \node[block] (agent) {Agent}; \node[block, below=2cm of agent] (environment) {Environment}; % Arrows \draw[->] ($(agent.east)+(0,0.1)$) -- ++(1.5,0) node[right, pos=0.75] {action $A_t$} -- ($(environment.east)+(0,0.1)$); \draw[->] ($(environment.west)+(0,-0.25)$) -- ++(-1.5,0) node[left, pos=0.25] {state $S_t$} -- ($(agent.west)+(0,0.25)$); \draw[->] ($(environment.west)+(0,0.25)$) -- ++(-0.75,0) node[left, pos=0.75] {reward $R_t$} -- ($(agent.west)+(0,-0.25)$); \end{tikzpicture}Here's what changed:
- Node Placement: Instead of placing the labels directly above/below the arrows, we now place them after the arrow has reached its target node. This prevents the labels from overlapping the arrowheads.
This adjustment ensures that the labels are clearly visible and don't obstruct the arrows.