• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Scala-Robotics-Simulator / PPS-22-srs / #728

21 Oct 2025 09:16AM UTC coverage: 76.144% (-2.2%) from 78.302%
#728

Pull #113

github

sceredi
feat: add rewards management to rl controller
Pull Request #113: feat: create reinforcement learning controller

139 of 233 new or added lines in 22 files covered. (59.66%)

6 existing lines in 3 files now uncovered.

1497 of 1966 relevant lines covered (76.14%)

8.43 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/src/main/scala/io/github/srs/model/entity/dynamicentity/DynamicEntity.scala
1
package io.github.srs.model.entity.dynamicentity
2

3
import io.github.srs.model.entity.Entity
4
import io.github.srs.model.entity.dynamicentity.actuator.Actuator
5
import io.github.srs.model.entity.dynamicentity.sensor.Sensor
6
import io.github.srs.model.environment.Environment
7
import io.github.srs.model.entity.dynamicentity.action.ActionAlgebra
8
import cats.effect.IO
9
import io.github.srs.model.entity.dynamicentity.agent.Agent
10
import io.github.srs.model.entity.dynamicentity.robot.Robot
11

12
/**
13
 * Represents a dynamic entity. A dynamic entity is an entity that can change its state over time.
14
 */
15
trait DynamicEntity extends Entity:
16
  /**
17
   * Returns the sequence of actuators that can act upon a dynamic entity.
18
   * @return
19
   *   the sequence of actuators.
20
   */
21
  def actuators: Seq[Actuator[? <: DynamicEntity]]
22

23
  /**
24
   * Returns the sequence of sensors that can sense the environment for a dynamic entity.
25
   * @return
26
   *   the sequence of sensors.
27
   */
28
  def sensors: Vector[Sensor[? <: DynamicEntity, ? <: Environment]]
29

30
object DynamicEntity:
NEW
31

×
32
  given ActionAlgebra[IO, DynamicEntity] with
33

8✔
34
    override def moveWheels(e: DynamicEntity, leftSpeed: Double, rightSpeed: Double): IO[DynamicEntity] =
35
      e match
36
        case robot: Robot => summon[ActionAlgebra[IO, Robot]].moveWheels(robot, leftSpeed, rightSpeed)
2✔
37
        case agent: Agent => summon[ActionAlgebra[IO, Agent]].moveWheels(agent, leftSpeed, rightSpeed)
14✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc