国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代寫Tic-Tac-To: Markov Decision、代做java程序語(yǔ)言
代寫Tic-Tac-To: Markov Decision、代做java程序語(yǔ)言

時(shí)間:2024-12-14  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



Coursework 2 – Tic-Tac-To: Markov Decision
Processes & Reinforcement Learning (worth 25%
of your final mark)
Deadline: Thursday, 28th November 2024
How to Submit: To be submitted to GitLab (via git commit & push) – Commits are
timestamped: all commits after the deadline will be considered late.
Introduction
Coursework 2 is an individual assignment, where you will each implement Value
Iteration, Policy Iteration that plan/learn to play 3x3 Tic-Tac-Toe game. You will test
your agents against other rule-based agents that are provided. You can also play against
all the agents including your own agents to test them.
The Starter Code for this project is commented extensively to guide you, and includes
Javadoc under src/main/javadoc/ folder in the main project folder - you should read
these carefully to learn to use the classes. This is comprised of the files below.
You should get the Starter Code from GitLab: Follow the step by step instructions in
the document I have put together for you:
Open Canvas->F29AI -> Modules -> GitLab (and Git) Learning Materials (Videos and
Crib Sheets) -> Introduction to Eclipse, Git & GitLab.
If you are unfamiliar with git and/or GitLab I strongly suggest watching Rob
Stewart’s instructive videos on Canvas under the same module
Files you will edit & submit
ValueIterationAgent.java A Value Iteration agent for solving the Tic-Tac-Toe
game with an assumed MDP model.
PolicyIterationAgent.java A Policy Iteration agent for solving the Tic-Tac-Toe
game with an assumed MDP model.
QLearningAgent.java A q-learner, Reinforcement Learning agent for the
Tic-Tac-Toe game.
Files you should read & use but shouldn’t need to edit
Game.java The 3x3 Tic-Tac-Toe game implementation.
TTTMDP.java Defines the Tic-Tac-Toe MDP model
TTTEnvironment.java Defines the Tic-Tac-Toe Reinforcement Learning
environment
Agent.java Abstract class defining a general agent, which other
agents subclass.
HumanAgent.java Defines a human agent that uses the command line to
ask the user for the next move
RandomAgent.java Tic-Tac-Toe agent that plays randomly according to a
RandomPolicy
Move.java Defines a Tic-Tac-Toe game move
Outcome.java A transition outcome tuple (s,a,r,s’)
Policy.java An abstract class defining a policy – you should subclass
this to define your own policies
TransitionProb.java A tuple containing an Outcome object and a probability
of the Outcome occurring.
RandomPolicy.java A subclass of policy – it’s a random policy used by a
RandomAgent instance.
What to submit: You will fill in portions of ValueIterationAgent.java,
PolicyIterationAgent.java and QLearningAgent.java during the assignment.
Commit & push your changes to your fork of the repository. Do this frequently so
nothing is lost. There will soon be automatic unit tests written for this project, which
means that you’ll be able to see whether your code passes the tests, both locally, and on
GitLab. I will send an announcement once I’ve uploaded the tests.
PLEASE DO NOT UPLOAD YOUR SOLUTIONS TO A PUBLIC REPOSITORY. We have
spent a great deal of time writing the code & designing the coursework and want to be
able to reuse this coursework in the coming years.
Evaluation: Your code will be tested on GitLab for correctness using Maven & the Java
Unit Test framework. Please do not change the names of any provided functions or
classes within the code, or you will wreck the tests.
Mistakes in the code: If you are sure you have found a mistake in the current code let
me or the lab helpers know and we will fix it.
Plagiarism: While you are welcome to discuss the problem together in the labs, we will
be checking your code against other submissions in the class for logical redundancy. If
you copy someone else's code and submit it with minor changes, we will know. These
cheat detectors are quite hard to fool, so please don't try. We trust you all to submit
your own work only; please don't let us down. If you do, we will pursue the strongest
consequences with the school that are available to us.
Getting Help: You are not alone! If you find yourself stuck on something, ask in the
labs. You can ask for help on GitLab too – but it means you will need to commit & push
your code first: don’t worry, you won’t be judged until the deadline. It’s good practice to
commit & push your code frequently to the repository, even if it doesn’t work.
We want this coursework to be intellectually rewarding and fun.
MDPs & Reinforcement Learning
To get started, run Game.java without any parameters and you’ll be able to play the
RandomAgent using the command line. From within the top level, main project folder:
java –cp target/classes/ ticTacToe.Game
You should be able to win or draw easily against this agent. Not a very good agent!
You can control many aspects of the Game, but mainly which agents will play each
other. A full list of options is available by running:
java –cp target/classes/ ticTacToe.Game -h
Use the –x & -o options to specify the agents that you want to play the game. Your own
agents, namely, Value Iteration, Policy Iteration, and Q-Learning agents are denoted as
vi, pi & ql respectively, and can only play X in the game. This ignores the problem of
dealing with isomorphic state spaces (mapping x’s to o’s and o’s to x’s in this case). For
example if you want two RandomAgents to play out the game, you do it like this:
java target/classes/ ticTacToe.Game –x random –o
random
Look at the console output that accompanies playing the game. You will be told about
the rewards that the ‘X’ agent receives. The `O’ agent is always assumed to be part of
the environment.
Question 1 (6 points) Write a value iteration agent in ValueIterationAgent.java
which has been partially specified for you. Here you need to implement the iterate() &
extractPolicy() methods. The former should perform value iteration for a number of
steps (k steps – this is one of the fields of the class) and the latter should extract the
policy from the computed values.
Your value iteration agent is an offline planner, not a reinforcement agent, and so the
relevant training option is the number of iterations of value iteration it should run in its
initial planning phase – you can change this in ValueIterationAgent.java.
ValueIterationAgent constructs a TTTMDP object on construction – you do not need to
change this class, but use it in your value iteration implementation to generate the set of
next game states (the sPrimes), their associated probabilities & rewards when executing
a move from a particular game state (a Game object). You can do this using the provided
generateTransitions method in the TTTMDP class, which effectively gives you a
probability distribution over Outcomes.
Value iteration computes k-step estimates of the optimal values, Vk. You will see that the
the Value Function, Vk is stored as a java HashMap, from Game objects (states) to a
double value. The corresponding hashCode function for Game objects has been
implemented so you can safely use whole Game objects as keys in the HashMap.
Note: You may assume that 50 iterations is enough for convergence in this question.
Note: Unlike the MDPs in the class, in the CW2 implementation, your agent receives a
reward when entering a state – the reward simply depends on the target state, rather
than on source state, action, and target state. This means that there is no imagined
terminal state outside the game like in the lectures. Don’t worry – all the methods you
have learned are compatible with this setting.
Note: The O agent is modelled as part of the environment, so that once your agent
(X) takes an action, any next observed state would include O’s move. The agents need
NOT care about the intermediate game/state where only they have played and not yet
the opponent.
The following command loads your ValueIterationAgent, which will compute a policy
and executes it 10 times against the other agent which you specify, e.g. random, or
aggressive. The –s option specifies which agent goes first (X or O). By default, the X
agent goes first.
java target/classes/ ticTacToe.Game -x vi -o
random –s x
Question 2 (1 point): Test your Value Iteration Agent against each of the provided
agents 50 times and report on the results – how many games they won, lost & drew
against each of the other rule based agents. The rule based agents are: random,
aggressive, defensive.
This should take the form of a very short .pdf report named: vi-agent-report.pdf.
Commit this together with your code, and push to your fork.
Question 3 (6 point) Write a Policy Iteration agent in PolicyIterationAgent.java by
implementing the initRandomPolicy(), evaluatePolicy(), improvePolicy() &
train() methods. The evaluatePolicy() method should evaluate the current policy
(see your lecture notes), specified in the curPolicy field (which your
initRandomPolicy() initialized). The current values for the current policy should be
stored in the provided policyValues map. The improvePolicy() method performs the
Policy improvement step, and updates curPolicy.
Question 4 (1 point): As in Question 2, this time test your Policy Iteration Agent
against each of the provided agents 50 times and report on the results – how many
games they won, lost & drew. The other agents are: random, aggressive, defensive.
This should take the form of a very short .pdf report named: pi-agent-report.pdf.
Commit this together with your code, and push to your fork.
Questions 5 & 6 are on Reinforcement Learning:
Question 5 (5 points): Write a Q-Learning agent in QLearningAgent.java by
implementing the train() & extractPolicy()methods. Your agent should follow an
e-greedy policy during training (and only during training – during testing it should follow
the extracted policy). Your agent will need to train for many episodes before the qvalues converge. Although default values have been set/given in the code, you are
strongly encouraged to play round with the hyperparameters of q-learning: the learning
rate (a), number of episodes to train, as well as the epsilon in the e-greedy policy
followed during training.
Question 6 (1 point): Like the previous questions, test your Q-Learning Agent against
each of the provided agents 50 times and report on the results - how many games they
won, lost & drew. The other agents are: random, aggressive, defensive.
This should take the form of a very short .pdf report named: ql-agent-report.pdf.
Commit this together with your code, and push to your fork.
Javadoc: There is extensive comments in the code, Javadoc (under the folder doc/ in
the project folder) and inline. You should read these carefully to understand what is
going on, and what methods to call/use. They might also contain hints in the right
direction.
Value of Terminal States: you need to be careful about the values of terminal states -
terminal states are states where X has won, states where O has won, and states where
the game is a draw. The value of these game states - V(g) - should under all
circumstances and in all iterations be set to 0. Here’s why: to find the optimal value
of a state you will be looping over all possible actions from that state. For terminal states
this is empty, and might, depending on your implementation of finding the
maximum, lead to a result where you would be setting the value of the terminal state to
a very low negative value (e.g. Double.MIN_VALUE). To avoid this, for every game
state g that you are considering and calculating its optimal value, CHECK IF IT
IS A TERMINAL STATE (using g.isTerminal()); if it is, set its value to 0, and
move to the next game state (you can use the ‘continue;’ statement inside your
loop). Note that your agent would have already received its reward when
transitioning INTO that state, not out of it.
Testing your agent: If everything is working well, and you have the right parameters
(e.g. reward function) your agents should never lose.
You can play around with the reward values in the TTTMDP class – especially try
increasing or decreasing the negative losing reward. Increasing this negative reward (to
more negative numbers) would encourage your agent to prefer defensive moves to
attacking moves. This will change their behavior (both for Policy & Value iteration) and
should encourage your agent to never lose the game. Machine Learning isn't like
Mathematics with complete certainty - you almost always have to experiment to get the
parameters of your model right!

請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp





 

掃一掃在手機(jī)打開(kāi)當(dāng)前頁(yè)
  • 上一篇:泰國(guó)駕照轉(zhuǎn)廣州駕照要怎么做(多長(zhǎng)時(shí)間)
  • 下一篇:代寫JC4004編程、代做Python設(shè)計(jì)程序
  • 無(wú)相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場(chǎng)仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲勞振動(dòng)
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個(gè)行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運(yùn)營(yíng)技巧,多多開(kāi)團(tuán)助手,多多出評(píng)軟件徽y1698861
    超全面的拼多多電商運(yùn)營(yíng)技巧,多多開(kāi)團(tuán)助手
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服務(wù)平臺(tái)
    CAE有限元仿真分析團(tuán)隊(duì),2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗(yàn)證碼 豆包網(wǎng)頁(yè)版入口 破天一劍 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    中文字幕精品在线播放| 精品中文字幕在线| 国内精品免费午夜毛片| 欧美最猛性xxxxx(亚洲精品)| 欧美一区二区三区综合| 无码人妻精品一区二区三区66| 亚洲一区二区三区视频播放| 欧美激情极品视频| 欧美大片欧美激情性色a∨久久| 欧美大片va欧美在线播放| www国产91| 精品国产一区av| 国产精品视频入口| 国产精品久久久久久久美男 | 精品国产一区二区三区免费| 国产精品久久久久久久av电影 | 深夜福利日韩在线看| 按摩亚洲人久久| 国产精品国产一区二区| 国产精品国产精品国产专区蜜臀ah | 青青草国产精品一区二区| 欧美一区视久久| 僵尸世界大战2 在线播放 | 欧美激情www| 精品日韩欧美| 成人免费在线小视频| 7777精品久久久大香线蕉小说| 国产成人福利网站| 国产精品美女黄网| 久久中文字幕在线视频| 亚洲一区二区三区四区视频| 日韩久久久久久久| 国产欧美va欧美va香蕉在| 国产精品99久久久久久久久久久久| 久久久久免费网| 免费97视频在线精品国自产拍| 一区二区免费在线视频| 欧美一区二区视频在线播放| 国产色综合天天综合网| 91久久精品一区二区别| 久久精品国产2020观看福利| 一区精品视频| 欧美精品一区二区三区久久| 99国内精品久久久久久久软件| 久久9精品区-无套内射无码| 久久综合色影院| 日韩wuma| 国产男女在线观看| 国产成人精品一区| 久久久久国产精品www| 日本久久久久久久| 国产欧美欧洲在线观看| 久久国产精品高清| 久久999免费视频| 日韩av成人在线| 国产三级中文字幕| 日韩一区二区欧美| 亚洲一区二区三区四区视频| 精品视频一区在线| 久久久久久久久中文字幕| 一区二区三视频| 美女在线免费视频| 色妞色视频一区二区三区四区| 在线观看一区二区三区三州| 欧美精品久久久| 国产成人精品电影久久久| 亚洲一区二区在线看| 免费精品视频一区二区三区| 国产超碰91| 亚洲一区二区三区精品视频| 国产在线青青草| 日韩中文字幕视频在线观看| 亚洲色成人一区二区三区小说| 国产中文字幕二区| 久久精品国产一区| 秋霞久久久久久一区二区| 久久久伊人欧美| 亚洲精品免费一区二区三区| 国产精品一区二区三区观看| 久久香蕉国产线看观看网| 青青在线视频免费| xxxx性欧美| 欧美两根一起进3p做受视频| 久久精品国产亚洲精品| 日韩亚洲欧美视频| 国产高清精品一区二区三区| 亚洲黄色网址在线观看| 成人在线一区二区| 伊人天天久久大香线蕉av色| 国产精品亚洲激情| 九九精品在线视频| 国产日韩欧美大片| 精品国产一区二区三区四区vr| 国产熟女高潮视频| 欧美日本精品在线| 国产美女精品久久久| 久久99久久99精品中文字幕| 国产九九九九九| 亚洲色成人一区二区三区小说| 81精品国产乱码久久久久久 | 色狠狠久久av五月综合| 久久免费高清视频| 日韩欧美在线一区二区| 日韩一区二区在线视频| 欧美精品一区二区三区四区五区 | 国产精品自产拍在线观看| 欧美精品videos性欧美| 成人精品视频99在线观看免费| 在线视频亚洲自拍| 国产精品一区二区不卡视频| 亚洲国产一区二区精品视频| 久久理论片午夜琪琪电影网| 日韩精品视频久久| 国产精品福利在线观看| 国产女人18毛片| 亚洲mm色国产网站| 久久久久久中文字幕| 欧美精品色婷婷五月综合| 久久av在线看| 91精品天堂| 日韩美女中文字幕| 国产精品久久..4399| 99亚洲国产精品| 日韩国产小视频| 国产精品无码av在线播放| 国产一区香蕉久久| 色婷婷精品国产一区二区三区 | 国产精品免费久久久| 国产精品自拍网| 日韩欧美三级一区二区| 国产精品久久久久高潮| 成人在线免费观看一区| 日本www在线播放| 伦理中文字幕亚洲| 91精品视频在线播放| 欧美精品尤物在线| 亚洲精品一品区二品区三品区| www.亚洲免费视频| 成人毛片网站| 欧美精品一区二区视频| 亚洲熟妇无码另类久久久| 国产成人精品在线观看| 俄罗斯精品一区二区| 欧洲久久久久久| 久久久久久高潮国产精品视| 播播国产欧美激情| 91久久久久久久一区二区| 国内免费精品永久在线视频| 丁香六月激情婷婷| 国产精品久久久久久五月尺 | 在线观看免费黄色片| 国产精品久在线观看| 国产精品99久久99久久久二8| 好吊色欧美一区二区三区| 日本一区二区三区精品视频| 久精品免费视频| 国产精品视频区| 国产脚交av在线一区二区| 国产伦精品一区二区三区| 欧美一区视久久| 日本一区二区三区免费观看| 欧美极品在线播放| 国产精品无码一本二本三本色| 91精品久久久久久久久久久 | 中文字幕一区二区中文字幕| 国产精品狼人色视频一区| 久久96国产精品久久99软件| 91久热免费在线视频| 国产精品自拍首页| 国产深夜男女无套内射| 激情综合网俺也去| 欧美又大又粗又长| 日本国产中文字幕| 午夜精品一区二区三区在线观看| 色综合久久88| 精品国产乱码久久久久久88av | 国产精品老女人视频| 久久精品国产一区二区电影| 久久精品国产一区二区三区不卡| 91久久精品美女| 91久久久国产精品| 99视频在线播放| 91精品免费看| 91高清免费视频| 成人伊人精品色xxxx视频| 高清一区二区三区视频| 国产九九九九九| 国产美女久久精品| 国产精品亚洲不卡a| 成人精品视频一区二区| 成人国产精品一区二区| 成人毛片100部免费看| 国产精品稀缺呦系列在线| 国产精品永久入口久久久| 国产乱人伦精品一区二区三区| 国产欧美va欧美va香蕉在线| 成人免费aaa| 久在线观看视频| 国产成人福利视频| 久久精品国产综合精品|