cd
~$:输入的指令是在 ~这个目录执行, ~代表的就是Home目录
返回上一级: cd…
去Home:cd~
向上返回两级:cd …/…/
ls
看文件夹下的东西
输出详细信息:ls -l
显示所有文件:ls -a
mkdir建立文件夹
mkdir folder2/f2:在folder2中建立f2文件夹
rmdir folder3:移除文件夹
rm删除文件
rm -r folder1:删除文件夹
首先在终端中
python3
import parl
help(parl)
help(parl.agent)
| Agent is one of the three basic classes of PARL.
|
| | It is responsible for interacting with the environment and collecting
| data for training the policy.
| | To implement a customized ``Agent``, users can:
|
| .. code-block:: python
|
| import parl
|
| class MyAgent(parl.Agent):
| def __init__(self, algorithm, act_dim):
| super(MyAgent, self).__init__(algorithm)
| self.act_dim = act_dim
|
| Attributes:
| alg (parl.algorithm): algorithm of this agent.
| place: can automatically specify device when creating a tensor.
|
| Public Functions:
| - ``sample``: return a noisy action to perform exploration according to the policy.
| - ``predict``: return an action given current observation.
| - ``learn``: update the parameters of self.alg using the `learn_program` defined in `build_program()`.
| - ``save``: save parameters of the ``agent`` to a given path.
| - ``restore``: restore previous saved parameters from a given path.
|
| Todo:
| - allow users to get parameters of a specified model by specifying the model's name in ``get_weights()``.
|
| Method resolution order:
| Agent
| parl.core.agent_base.AgentBase
| builtins.object