# Learning to drive player car

**URL:** <https://forums.unrealengine.com/t/learning-to-drive-player-car/2141372>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [November 21, 2024, 6:48pm UTC](https://forums.unrealengine.com/t/learning-to-drive-player-car/2141372 "2024-11-21T18:48:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shadedlady](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadedlady](https://forums.unrealengine.com/u/Shadedlady)\
**Post date:** [November 21, 2024, 6:48pm UTC](https://forums.unrealengine.com/t/learning-to-drive-player-car/2141372/1 "2024-11-21T18:48:39Z")

</div>

My question is about the tutorial learning to drive  
[Learning Agents (5.5)](https://dev.epicgames.com/community/learning/courses/GAR/unreal-engine-learning-agents-5-5/7dmy/unreal-engine-learning-to-drive-5-5#createthemanagerblueprint)

At the start of the tutorial I removed the player car and only put the sportscar pawns in to train. But now they are trained I want to use them with inference as opponents to the player car. But I can’t seem to get a player controlled car in anymore now. Just adding PlayerStart doesn’t help, I guess I have to do something else too but don’t know what. Someone can give a tip? The ai driven cars are working fine.

also during training I couldn’t use tensorboard because Unreal never wrote anything in the folder that was supposed to have the information for tensorflow/tensorboard. I did check ‘use tensorboard’ as indicated  
[Setting up TensorBoard](https://dev.epicgames.com/community/learning/tutorials/Zen7/unreal-engine-setting-up-tensorboard)  
Tensorboard is installed and the browser can open the server, but there is just no data to be read because the folder is empty  
I tried try to fill in several paths as indicated  
[unreal.LearningAgentsTrainerProcessSettings](https://dev.epicgames.com/documentation/en-us/unreal-engine/python-api/class/LearningAgentsTrainerProcessSettings?application_version=5.5)  
but none of those made any difference except crashing the learning program

EDIT sorry for the confusion I didn’t know which category this had to be in

---

<div class="post-metadata">

**Author:** ![AntiSarumyan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AntiSarumyan](https://forums.unrealengine.com/u/AntiSarumyan)\
**Post date:** [November 22, 2024, 11:03am UTC](https://forums.unrealengine.com/t/learning-to-drive-player-car/2141372/3 "2024-11-22T11:03:34Z")

</div>

Hi) I think that for the player’s car you can implement such logic that a check will be made on BeginPlay. If the car is controlled by the player, then nothing happens, and if not, then it is registered as an agent.

Regarding “tensorboard”, I also have difficulties. I have to install it every time. I created a .bat file for myself and run it every time AFTER starting the project.

These are the lines I use there:

C:\*\*\*\*\Intermediate\PipInstall\Scripts\python -m pip install tensorboard

C:\*_ **\T\_Arrow\_5\_5\_0\_V1\Intermediate\PipInstall\Scripts\tensorboard --logdir=C:\*** _\Intermediate\LearningAgents\TensorBoard\runs

Where “\*\*\*\*” is the path to your project.

---

<div class="post-metadata">

**Author:** ![Shadedlady](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadedlady](https://forums.unrealengine.com/u/Shadedlady)\
**Post date:** [November 22, 2024, 11:10am UTC](https://forums.unrealengine.com/t/learning-to-drive-player-car/2141372/4 "2024-11-22T11:10:38Z")

</div>

Thanks for the tips.  
About tenserboard, that does work, but unreal doesn’t spit out the data that it needs to use

---

<div class="post-metadata">

**Author:** ![Shadedlady](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadedlady](https://forums.unrealengine.com/u/Shadedlady)\
**Post date:** [November 22, 2024, 4:13pm UTC](https://forums.unrealengine.com/t/learning-to-drive-player-car/2141372/5 "2024-11-22T16:13:10Z")

</div>

I got it to work. I made a copy of the sportscar and called it playercar and in the vehicleadvgamemode I set the default pawn class to the playercar. I also removed the script for the agents from the playercar. So That part is solved:smiley:

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [December 22, 2024, 4:13pm UTC](https://forums.unrealengine.com/t/learning-to-drive-player-car/2141372/6 "2024-12-22T16:13:24Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
