tanliyon / gym-xiangqi

This repo sets up the environment to play Xiang Qi (chinese chess) following the OpenAI Gym framework.
GNU Lesser General Public License v3.0
32 stars 6 forks source link

Update agent_v_agent_demo.py #132

Open asherchok opened 1 year ago

asherchok commented 1 year ago

Description

Fixed a rendering issue in the agent_v_agent_demo.py file. Previously, the demo would throw a ResetNeeded error if the render() function was called before reset(). The fix involves adding a reset() call before render() to ensure the environment is in a valid state for rendering.

Type of change

How has this been tested?

I ran the agent_v_agent_demo.py file with and without the fix. Before the fix, the demo would throw the ResetNeeded error, but with the fix, the demo ran without any errors and displayed the Xiangqi game properly.

asherchok commented 1 year ago

@tanliyon please merge merge-me