From 3539f928b60a07b7b13cb3d92ea6577da2630624 Mon Sep 17 00:00:00 2001 From: datahaki Date: Tue, 3 Oct 2023 22:24:33 +0200 Subject: [PATCH] v21 --- .github/workflows/mvn_test.yml | 6 +++--- pom.xml | 2 +- src/test/java/ch/alpine/subare/book/ch01/tic/Agent.java | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/mvn_test.yml b/.github/workflows/mvn_test.yml index 09ec626c..84814e2f 100644 --- a/.github/workflows/mvn_test.yml +++ b/.github/workflows/mvn_test.yml @@ -1,4 +1,4 @@ -name: mvn test with JDK 20 +name: mvn test with JDK 21 on: push: paths: @@ -12,10 +12,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - name: Set up JDK 20 + - name: Set up JDK 21 uses: actions/setup-java@v2 with: - java-version: '20' + java-version: '21' distribution: 'temurin' - name: mvn install tensor working-directory: . diff --git a/pom.xml b/pom.xml index de6efa9c..cfc4a1a9 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ maven-compiler-plugin 3.11.0 - 17 + 21 diff --git a/src/test/java/ch/alpine/subare/book/ch01/tic/Agent.java b/src/test/java/ch/alpine/subare/book/ch01/tic/Agent.java index 29381483..51eff0f6 100755 --- a/src/test/java/ch/alpine/subare/book/ch01/tic/Agent.java +++ b/src/test/java/ch/alpine/subare/book/ch01/tic/Agent.java @@ -41,8 +41,7 @@ final void feedState(State state) { // update estimation according to reward final void feedReward(double reward) { - Collections.reverse(states); - for (State latestState : states) { + for (State latestState : states.reversed()) { double value = estimation.get(latestState) // + stepSize * (reward - estimation.get(latestState)); estimation.put(latestState, value);