From eba969f076adadf55170c45de40da7bc4ebf196e Mon Sep 17 00:00:00 2001 From: BOTLester <58360400+BOTLester@users.noreply.github.com> Date: Sun, 10 May 2020 23:21:03 +0200 Subject: [PATCH 01/10] Fixing documenation --- Game1/Sources/Crops/Crops.cs | 2 +- Oskar_Nastaly_ML_Report.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Game1/Sources/Crops/Crops.cs b/Game1/Sources/Crops/Crops.cs index 97132da..6376696 100644 --- a/Game1/Sources/Crops/Crops.cs +++ b/Game1/Sources/Crops/Crops.cs @@ -287,7 +287,7 @@ class Crops r = (1.0f - productionRate) * 4; g = 0.0f + productionRate; - b = 0.0f + (float)Math.Pow((double)overhead * 10, 2); + b = 0.0f + overhead * 3; a = 255; return new Vector4(r, g, b, a); diff --git a/Oskar_Nastaly_ML_Report.md b/Oskar_Nastaly_ML_Report.md index afdfb3f..72a6857 100644 --- a/Oskar_Nastaly_ML_Report.md +++ b/Oskar_Nastaly_ML_Report.md @@ -1,6 +1,5 @@ # Machine Learning Method implementation report - Oskar Nastały - ## Introduction Purpose of my ML implementation is for the agent (tractor) to decide what fertilizer it should use. @@ -111,4 +110,6 @@ If field is properly fertilized it will have higher production rate, resulting i Production rate value is shown in the UI as well as it is represented by the colour of progression bar (right side of every tile). At 100% bar will pure **Green**. Any value below will make bar more **Red**, while any value above will add **Blue**, eventually turning bar colour into cyan. -![Example](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/src/Oskar-ML/example_img.png) +Example: +![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/src/Oskar-ML/example_img.png?raw=true) + From e84c9b897adb72404c920d843f5fbe358e6e2097 Mon Sep 17 00:00:00 2001 From: BOTLester <58360400+BOTLester@users.noreply.github.com> Date: Sun, 10 May 2020 23:23:18 +0200 Subject: [PATCH 02/10] more fixes --- example_img.jpg | Bin 0 -> 11247 bytes example_img.png | Bin 4640 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 example_img.jpg delete mode 100644 example_img.png diff --git a/example_img.jpg b/example_img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0a7c3b89f800535b27fe6fdd2a69645685a4e0c5 GIT binary patch literal 11247 zcmbt)2V4`|x9%WSL@A0i1(hmQnn;n@0099(I%19r(!|h<1fqBVrA1IcK#9_ODAG%$ zD@CM+B81*cLJg2i-uQ3VbKAS`z9IXUJ(<~i_F8+D?^^?Hh&BOm=xOU}19WtBz#q^b zK$`@twfvkO0f2!4APE2f3&2QE2QWfCI;iQ<)Bo-JS06Cu_pCiyk|*C^=2#=^|<>yH1ogZ2gBWC8MlIeNNtz#&dLdQLi8 zGav-5lo8UzFJ=7WpgTm*z{mtGiS-C{Lm3COe0usr&|(=GAaUseq3ZwxCnMKc`KwIF zjqfv`b3dW*JmwRN@U`LwZj&COh~fi};KQsZd3gEwMa9G=&PysOUsSoIs&@T`mbT7K zUA;S|X66=_R@M*g>>oKeIyrlKdHeYK`9FQ}XGmz+%U9vCZ{EhmC%j8cN=-}8$jr*l z$t@}UTvlFDSykQG)ZEhA_VrtPZ(skwAbx0gWO8bHW_E6VVR4DHvAMOqvrFFF|0Ne4 zK>v5K{w3MJlZz9Q>kzaD49vgeqC4aZHF{14#C8;+N)pg^s!8He~pstII)y;|# z9w*BCLRI5*A4~`(T{xHHm4liTtwWncPpK+>Z8+dRck0&9oOh+bP2sZ_DH*!RO0Qw; z74EG9Yl2Nt^wOY_0-pk%q}kix>r&?%%*`3N&v2g!reiP*|Ay24q0Fbu82kOGnwDI) zf4K0FnVa}HvxsDFk!MtHy28rY?Q8)1J<0*R&I8{brU6^R@YLgJ=N?VnfPUi<>yV`O;YH1OPR0Ea!KqU3eVUW1i|c;bqxkAk*Oi{F`FRxzkIVFBe3M)>tTZ~to5a%!KZ+EcK8)1L zShg;Ik!Ndl^m2N5qk!u*uZnm@4IfWKSvIZEZCwt|TKosFiyzjEW?O_G@xmPU%WB;q zx8s||n?RBNdD2>yr}TcXU&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%i?E;L}f9lzJDg{5tIYPAI{{zb435oy! literal 0 HcmV?d00001 diff --git a/example_img.png b/example_img.png deleted file mode 100644 index 7ab2dc9abfa8d7ccfe4379e5abc71a6245a4f10a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4640 zcmaKwc_5Ts-^cB;FNG|X-Pnl;WgVgrhS3lrSCT1}B|<`Exkbz%Su)vYEL|}bCVO%z zSx1vwbysAU7zx93NzeT}@B2LO`^Pmi=bYd9o!{@A>wM4WOp=5BF+OeyZYCxsJ{xPK z6Z|~^KcrnO@aM;#W7`GhAg5#IOx3+oQ*eRJ&&TQr_&S9Q&`8|yg|7p+sYO4>VmN|&WIE4i-D>S3x~ zs!b+A#{ZDroQ1boRZ%Q=ia;cjr6QnkYlLPT%;_UcdG8 zV_@y*_r(OA-otz*ZGwP^&bdE(G9qOl7In$nPWDjNn}USydwvC*o1-FI7d-zwr4zjj zh;2rEl|bx&_ZW^+V{6PqKdwG(Zvx_etbeXofF9OC9rRCR}N9&jG4QV7G+$mQ+r;u2VtW8Rxr*yR)LI)27wtb;k zx;khpvEV6l)B{p)Df~gsu<7=359WxzQYymwc+W&ErkQ4m@25wLR~C5Gy#>wxDAx zok5%(C`rL6q@$joaex-^W5F%8yBF%OWdzdWYbi@vF-IeoZ+=<5?^`yYZ+5dJw4Sgswi-|=#@PWqLNG=AGen` zqmeH%_?xscMC{(;_vutBVJ&IAhKnB2D(!Ld2zQiTyo=hG;#t4?4{cwPBJ8{5uRvMZ zCXfndz&{}K0jXmDE|jQB&RcwmwU6eg|MWDu_P8GGbXwfRTZD&(;L*NnJ^gj$hlWd| zV3;Y0JK9;eC8Ohi-a0IaB8qH7C z%00Jb`T>AA?f^2@7(*sGWypB-BZD;Hf3;qZ0~!dPsaAMcVa+BQ0y>i!zSmOv8!S_O z7Jga=+G=GGuwN63!euxh^7E_4iiJ&wW0R3~v@}foU#{q}s<8^|TVS}j@FWR?YE=;> zRL}P3#&k_{m=3&mC?4S&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~ z_+Ny|?nssSKk;?DvEOBdSj9+dzOFY>=*m}W*zaWUO1IfG2Uo%z_qT@~UcLGa#6-Ay zyi&Pg3+Wl_!Y9i=sq8;Ebvv3EaC7{Fpralq5+kMs80D_{_&7bjaQ)>t%V3%wtca&& zD`)NJ&SmRET~7AteWFO3E`h`o4A2V>UFPUHc+51%YR^rC`%|O`X7CT9ye4SQ>CJGTMjr5rA9Hy9e_4<2;6ONj&9(ECptSUdH z_^Xi^J;iy!Z~D4;bp%Fy?_rr_Xu6X9g4lI^ULPm4iO1j0%T*=AfR=$M;Vh$b%Y!@Y zyPZ=WxK8yP>c>%49ca@7-}EJtK=DLS!}Nb?=}w(R^YZ<#sb}$~{4V@{BIYpleJaCF zGAE8}!AGnRz(@qy?Y`iK7XYrN8sNuwN0M+N;(iQbCKijUQojG)ANXd$&FiSg>PThp za}HH*iC##tM8da!*o37SyfKHQ*~5_4QbXEO(57joNJHnOp$4Y^z84sv}n${vJt zvf?ahv5F1Q+N0pS8{o40-%0;Q&|eodGx!zH!|_FR9g%^q!V7rom$-h)FRSqt*}Zdv z8i33dWrT{-J@vLsQJCgWv61Sfof2NP<)y|ZQ(JrjWiOJ?ux`Qs>M+?@+9RvY&&2)% DVV2^G From af0a2bbefa3f4c9d9ba95e9162aca048c2f8072d Mon Sep 17 00:00:00 2001 From: BOTLester <58360400+BOTLester@users.noreply.github.com> Date: Sun, 10 May 2020 23:24:06 +0200 Subject: [PATCH 03/10] document update --- Oskar_Nastaly_ML_Report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oskar_Nastaly_ML_Report.md b/Oskar_Nastaly_ML_Report.md index 72a6857..905f1b3 100644 --- a/Oskar_Nastaly_ML_Report.md +++ b/Oskar_Nastaly_ML_Report.md @@ -111,5 +111,5 @@ Production rate value is shown in the UI as well as it is represented by the col At 100% bar will pure **Green**. Any value below will make bar more **Red**, while any value above will add **Blue**, eventually turning bar colour into cyan. Example: -![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/src/Oskar-ML/example_img.png?raw=true) +![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/src/Oskar-ML/example_img.jpg?raw=true) From a90602b9c62735d844e5c4cc49d422eacfba88d7 Mon Sep 17 00:00:00 2001 From: BOTLester <58360400+BOTLester@users.noreply.github.com> Date: Sun, 10 May 2020 23:25:03 +0200 Subject: [PATCH 04/10] Fixing documentation --- Oskar_Nastaly_ML_Report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oskar_Nastaly_ML_Report.md b/Oskar_Nastaly_ML_Report.md index 905f1b3..903d47a 100644 --- a/Oskar_Nastaly_ML_Report.md +++ b/Oskar_Nastaly_ML_Report.md @@ -111,5 +111,5 @@ Production rate value is shown in the UI as well as it is represented by the col At 100% bar will pure **Green**. Any value below will make bar more **Red**, while any value above will add **Blue**, eventually turning bar colour into cyan. Example: -![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/src/Oskar-ML/example_img.jpg?raw=true) +![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/src/af0a2bbefa3f4c9d9ba95e9162aca048c2f8072d/example_img.jpg) From aa2ec07c35b9eabec8c595a1052a7a648859f255 Mon Sep 17 00:00:00 2001 From: BOTLester <58360400+BOTLester@users.noreply.github.com> Date: Sun, 10 May 2020 23:29:40 +0200 Subject: [PATCH 05/10] Fixing documentation --- Oskar_Nastaly_ML_Report.md | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/Oskar_Nastaly_ML_Report.md b/Oskar_Nastaly_ML_Report.md index 903d47a..a16c2d0 100644 --- a/Oskar_Nastaly_ML_Report.md +++ b/Oskar_Nastaly_ML_Report.md @@ -7,7 +7,7 @@ It's decision is mostly based on nutrients in soil, but also on few other proper Dataset is very small, it contains only 100 entries. There are 7 types of fertilizers, each of them adding a specific amount of nutrients to the soil. Example: -''' + FertilizerType[6] = new Fertilizer { ID = 5, @@ -16,14 +16,12 @@ Example: Phosphorus = 1.77f / 5, Potassium = 9.5f / 5 }; -''' - + Unfortunately values of nutrients are not based on real values. That is because even though dataset intention (by it's creator) was to be used to classify fertilizers, it looks like instead it says what fertilizer WAS used and what will be the results of using that fertilizer on some field. E.g: Urea has 46% of Nitrogen in it and nothing else. In dataset it was classified as best fertilizer to be used on fields with already really high Nitrogen levels. That would lead to oversaturation with Nitrogen and lack of other nutrients. So i did some calculations and Urea now looks like this: -''' FertilizerType[7] = new Fertilizer { ID = 6, @@ -33,7 +31,7 @@ So i did some calculations and Urea now looks like this: Potassium = 9.5f / 5 }; // an "inversed" and little modified counterpart of real-world version of this fertilizer. -''' + ## Implementation @@ -41,15 +39,13 @@ I used Gradient Boosting Decision Tree Algorithm for this task due to many featu First a csv file is loaded: -''' IDataView trainingDataView = mlContext.Data.LoadFromTextFile( path: path, hasHeader: true, separatorChar: ',', allowQuoting: true, allowSparse: false); -''' - + Then it is passed to next function which will train, evaluate and build a model. Also trainer parameters will be fine-tuned here to prevent overfitting as much as possible by: - limiting number of leaves, @@ -59,7 +55,6 @@ while maintaining high accuracy by: - low learning rate combine with - high number of iterations. -''' var options = new LightGbmMulticlassTrainer.Options { MaximumBinCountPerFeature = 8, @@ -74,11 +69,9 @@ while maintaining high accuracy by: MaximumTreeDepth = 10 } }; -''' Creating pipeline for the model: -''' var pipeline = mlContext.Transforms .Text.FeaturizeText("Soil_TypeF", "Soil_Type") .Append(mlContext.Transforms.Text.FeaturizeText("Crop_TypeF", "Crop_Type")) @@ -87,16 +80,13 @@ Creating pipeline for the model: .AppendCacheCheckpoint(mLContext) .Append(mLContext.MulticlassClassification.Trainers.LightGbm(options)) .Append(mlContext.Transforms.Conversion.MapKeyToValue("PredictedLabel", "PredictedLabel")); -''' Evaluation of the pipeline is done with cross-validation method with 10 folds. Results are as follow: -''' Micro Accuracy: 0.95829 LogLoss Average: 0.100171 LogLoss Reduction: 0.933795 -''' Model is created and saved for later use, to skip long trainig and evaluation times. Later that model is loaded and prediction engine is created when program is started. @@ -111,5 +101,5 @@ Production rate value is shown in the UI as well as it is represented by the col At 100% bar will pure **Green**. Any value below will make bar more **Red**, while any value above will add **Blue**, eventually turning bar colour into cyan. Example: -![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/src/af0a2bbefa3f4c9d9ba95e9162aca048c2f8072d/example_img.jpg) +![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/raw/Oskar-ML/example_img.jpg) From d4f5c25d3ba6007c71bce8921a1781c744e3b51a Mon Sep 17 00:00:00 2001 From: BOTLester <58360400+BOTLester@users.noreply.github.com> Date: Sun, 10 May 2020 23:31:30 +0200 Subject: [PATCH 06/10] Fixing documentation --- Oskar_Nastaly_ML_Report.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Oskar_Nastaly_ML_Report.md b/Oskar_Nastaly_ML_Report.md index a16c2d0..742c3f3 100644 --- a/Oskar_Nastaly_ML_Report.md +++ b/Oskar_Nastaly_ML_Report.md @@ -1,4 +1,4 @@ -# Machine Learning Method implementation report - Oskar Nastały +### Machine Learning Method implementation report - Oskar Nastały ## Introduction @@ -99,7 +99,8 @@ Upon planting and visitin already growing plants agent decides if any fertilizer If field is properly fertilized it will have higher production rate, resulting in faster growth of a plant. Production rate value is shown in the UI as well as it is represented by the colour of progression bar (right side of every tile). At 100% bar will pure **Green**. Any value below will make bar more **Red**, while any value above will add **Blue**, eventually turning bar colour into cyan. - Example: -![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/raw/Oskar-ML/example_img.jpg) + + + ![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/raw/Oskar-ML/example_img.jpg) From 2383ac5b9a3055462d9ec1742bc02661392ef4c1 Mon Sep 17 00:00:00 2001 From: BOTLester <58360400+BOTLester@users.noreply.github.com> Date: Sun, 10 May 2020 23:33:39 +0200 Subject: [PATCH 07/10] Fixing documentation --- Oskar_Nastaly_ML_Report.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Oskar_Nastaly_ML_Report.md b/Oskar_Nastaly_ML_Report.md index 742c3f3..1869552 100644 --- a/Oskar_Nastaly_ML_Report.md +++ b/Oskar_Nastaly_ML_Report.md @@ -1,5 +1,4 @@ -### Machine Learning Method implementation report - Oskar Nastały - +# Machine Learning Method implementation report - Oskar Nastały ## Introduction Purpose of my ML implementation is for the agent (tractor) to decide what fertilizer it should use. @@ -102,5 +101,5 @@ At 100% bar will pure **Green**. Any value below will make bar more **Red**, whi Example: - ![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/raw/Oskar-ML/example_img.jpg) +![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/raw/Oskar-ML/example_img.jpg) From 099a40be9f2927e2f7217be84b77127363019f45 Mon Sep 17 00:00:00 2001 From: BOTLester <58360400+BOTLester@users.noreply.github.com> Date: Sun, 10 May 2020 23:36:05 +0200 Subject: [PATCH 08/10] docs --- Oskar_Nastaly_ML_Report.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Oskar_Nastaly_ML_Report.md b/Oskar_Nastaly_ML_Report.md index 1869552..fc56e1f 100644 --- a/Oskar_Nastaly_ML_Report.md +++ b/Oskar_Nastaly_ML_Report.md @@ -1,4 +1,6 @@ -# Machine Learning Method implementation report - Oskar Nastały +# Machine Learning Method implementation report +Oskar Nastały + ## Introduction Purpose of my ML implementation is for the agent (tractor) to decide what fertilizer it should use. From f933f7c13a8c21ed00f68a64908b7846ada5c50c Mon Sep 17 00:00:00 2001 From: BOTLester <58360400+BOTLester@users.noreply.github.com> Date: Sun, 10 May 2020 23:40:55 +0200 Subject: [PATCH 09/10] Final corrections --- Oskar_Nastaly_ML_Report.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Oskar_Nastaly_ML_Report.md b/Oskar_Nastaly_ML_Report.md index fc56e1f..38cdff5 100644 --- a/Oskar_Nastaly_ML_Report.md +++ b/Oskar_Nastaly_ML_Report.md @@ -1,7 +1,4 @@ -# Machine Learning Method implementation report -Oskar Nastały - -## Introduction +## Introduction Purpose of my ML implementation is for the agent (tractor) to decide what fertilizer it should use. It's decision is mostly based on nutrients in soil, but also on few other properties. From 4c18222a5340e1b0020c75d5da7eed095a8ec4d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Nasta=C5=82y?= Date: Sun, 10 May 2020 21:51:12 +0000 Subject: [PATCH 10/10] Fixing docs --- Oskar_Nastaly_ML_Report.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Oskar_Nastaly_ML_Report.md b/Oskar_Nastaly_ML_Report.md index 38cdff5..ecf7ac8 100644 --- a/Oskar_Nastaly_ML_Report.md +++ b/Oskar_Nastaly_ML_Report.md @@ -1,4 +1,8 @@ -## Introduction +# Machine Learning implementation report + + + +## Introduction Purpose of my ML implementation is for the agent (tractor) to decide what fertilizer it should use. It's decision is mostly based on nutrients in soil, but also on few other properties. @@ -94,11 +98,23 @@ Later that model is loaded and prediction engine is created when program is star Agent (tractor) navigates trough the grid looking for tiles where it can plant some plants. Upon planting and visitin already growing plants agent decides if any fertilizer is needed (rule based decision), and what fertilizer to use (using ML prediction engine). + + if (farm.getCrop(x, y).getStatus() >= 2) + { + fertilizer = fertilizerHolder.GetFertilizer(Engine.PredictFertilizer(farm.getCrop(x, y), farm.getPresetCropTypes(farm.getCrop(x, y).getCropType()))); + while (!(farm.getCrop(x, y).isSaturated(-1)) && farm.getCrop(x, y).belowCapacity() && inventory.useItem(fertilizerHolder.GetFertilizerID(fertilizer.Name), 0)) + { + farm.getCrop(x, y).Fertilize(fertilizer); + fertilizer = fertilizerHolder.GetFertilizer(Engine.PredictFertilizer(farm.getCrop(x, y), farm.getPresetCropTypes(farm.getCrop(x, y).getCropType()))); + WaitTwoFrames = true; + } + If field is properly fertilized it will have higher production rate, resulting in faster growth of a plant. Production rate value is shown in the UI as well as it is represented by the colour of progression bar (right side of every tile). At 100% bar will pure **Green**. Any value below will make bar more **Red**, while any value above will add **Blue**, eventually turning bar colour into cyan. + Example: -![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/raw/Oskar-ML/example_img.jpg) + ![Progression Bar](https://git.wmi.amu.edu.pl/s425077/PotatoPlan/raw/Oskar-ML/example_img.jpg)