Implemented Tree based ML algorithm

This commit is contained in:
BOTLester 2020-05-06 16:27:14 +02:00
parent 4ea129f803
commit d9ff997ea3
25 changed files with 4421 additions and 79 deletions

View File

@ -7,12 +7,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Game1", "Game1\Game1.csproj
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86 Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86 Release|x86 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{650E4519-2DEF-496F-AC3B-3C794DC7CF0D}.Debug|x64.ActiveCfg = Debug|x64
{650E4519-2DEF-496F-AC3B-3C794DC7CF0D}.Debug|x64.Build.0 = Debug|x64
{650E4519-2DEF-496F-AC3B-3C794DC7CF0D}.Debug|x86.ActiveCfg = Debug|x86 {650E4519-2DEF-496F-AC3B-3C794DC7CF0D}.Debug|x86.ActiveCfg = Debug|x86
{650E4519-2DEF-496F-AC3B-3C794DC7CF0D}.Debug|x86.Build.0 = Debug|x86 {650E4519-2DEF-496F-AC3B-3C794DC7CF0D}.Debug|x86.Build.0 = Debug|x86
{650E4519-2DEF-496F-AC3B-3C794DC7CF0D}.Release|x64.ActiveCfg = Release|x64
{650E4519-2DEF-496F-AC3B-3C794DC7CF0D}.Release|x64.Build.0 = Release|x64
{650E4519-2DEF-496F-AC3B-3C794DC7CF0D}.Release|x86.ActiveCfg = Release|x86 {650E4519-2DEF-496F-AC3B-3C794DC7CF0D}.Release|x86.ActiveCfg = Release|x86
{650E4519-2DEF-496F-AC3B-3C794DC7CF0D}.Release|x86.Build.0 = Release|x86 {650E4519-2DEF-496F-AC3B-3C794DC7CF0D}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,100 @@
Temparature,Humidity ,Moisture,Soil Type,Crop Type,Nitrogen,Potassium,Phosphorous,Fertilizer Name
26,52,38,Sandy,Maize,37,0,0,Urea
29,52,45,Loamy,Sugarcane,12,0,36,DAP
34,65,62,Black,Cotton,7,9,30,14-35-14
32,62,34,Red,Tobacco,22,0,20,28-28
28,54,46,Clayey,Paddy,35,0,0,Urea
26,52,35,Sandy,Barley,12,10,13,17-17-17
25,50,64,Red,Cotton,9,0,10,20-20
33,64,50,Loamy,Wheat,41,0,0,Urea
30,60,42,Sandy,Millets,21,0,18,28-28
29,58,33,Black,Oil seeds,9,7,30,14-35-14
27,54,28,Clayey,Pulses,13,0,40,DAP
31,62,48,Sandy,Maize,14,15,12,17-17-17
25,50,65,Loamy,Cotton,36,0,0,Urea
32,62,41,Clayey,Paddy,24,0,22,28-28
26,52,31,Red,Ground Nuts,14,0,41,DAP
31,62,49,Black,Sugarcane,10,13,14,17-17-17
33,64,34,Clayey,Pulses,38,0,0,Urea
25,50,39,Sandy,Barley,21,0,19,28-28
28,54,65,Black,Cotton,39,0,0,Urea
29,58,52,Loamy,Wheat,13,0,36,DAP
30,60,44,Sandy,Millets,10,0,9,20-20
34,65,53,Loamy,Sugarcane,12,14,12,17-17-17
35,68,33,Red,Tobacco,11,0,37,DAP
28,54,37,Black,Millets,36,0,0,Urea
33,64,39,Clayey,Paddy,13,0,10,20-20
26,52,44,Sandy,Maize,23,0,20,28-28
30,60,63,Red,Cotton,9,9,29,14-35-14
32,62,30,Loamy,Sugarcane,38,0,0,Urea
37,70,32,Black,Oil seeds,12,0,39,DAP
26,52,36,Clayey,Pulses,14,0,13,20-20
29,58,40,Red,Ground Nuts,24,0,23,28-28
30,60,27,Loamy,Sugarcane,12,0,40,DAP
34,65,38,Clayey,Paddy,39,0,0,Urea
36,68,38,Sandy,Barley,7,9,30,14-35-14
26,52,48,Loamy,Wheat,23,0,19,28-28
28,54,35,Black,Millets,41,0,0,Urea
30,60,61,Loamy,Cotton,8,10,31,14-35-14
37,70,37,Clayey,Paddy,12,0,41,DAP
25,50,26,Red,Ground Nuts,15,14,11,17-17-17
29,58,34,Sandy,Millets,15,0,37,DAP
27,54,30,Clayey,Pulses,13,0,13,20-20
30,60,58,Loamy,Sugarcane,10,7,32,14-35-14
32,62,34,Red,Tobacco,22,0,24,28-28
34,65,60,Black,Sugarcane,35,0,0,Urea
35,67,42,Sandy,Barley,10,0,35,DAP
38,70,48,Loamy,Wheat,8,8,28,14-35-14
26,52,32,Black,Oil seeds,12,0,8,20-20
29,58,43,Clayey,Paddy,24,0,18,28-28
30,60,29,Red,Ground Nuts,41,0,0,Urea
33,64,51,Sandy,Maize,5,9,29,14-35-14
34,65,31,Red,Tobacco,23,0,21,28-28
36,68,33,Black,Oil seeds,13,0,14,20-20
28,54,38,Clayey,Pulses,40,0,0,Urea
30,60,47,Sandy,Barley,12,0,42,DAP
31,62,63,Red,Cotton,11,12,15,17-17-17
27,53,43,Black,Millets,23,0,24,28-28
34,65,54,Loamy,Wheat,38,0,0,Urea
29,58,37,Sandy,Millets,8,0,15,20-20
25,50,56,Loamy,Sugarcane,11,13,15,17-17-17
32,62,34,Red,Ground Nuts,15,0,37,DAP
28,54,41,Clayey,Paddy,36,0,0,Urea
30,60,49,Loamy,Wheat,13,0,9,20-20
34,65,64,Black,Cotton,24,0,20,28-28
28,54,47,Sandy,Barley,5,18,15,10-26-26
27,53,35,Black,Oil seeds,37,0,0,Urea
36,68,62,Red,Cotton,15,0,40,DAP
34,65,57,Black,Sugarcane,9,0,13,20-20
29,58,55,Loamy,Sugarcane,8,8,33,14-35-14
25,50,40,Clayey,Pulses,6,19,16,10-26-26
30,60,38,Sandy,Millets,10,0,14,20-20
26,52,39,Clayey,Pulses,21,0,23,28-28
31,62,32,Red,Tobacco,39,0,0,Urea
34,65,48,Loamy,Wheat,23,0,19,28-28
27,53,34,Black,Oil seeds,42,0,0,Urea
33,64,31,Red,Ground Nuts,13,0,39,DAP
29,58,42,Clayey,Paddy,9,10,22,14-35-14
30,60,47,Sandy,Maize,22,0,21,28-28
27,53,59,Loamy,Sugarcane,10,0,15,20-20
26,52,36,Clayey,Pulses,7,16,20,10-26-26
34,65,63,Red,Cotton,14,0,38,DAP
28,54,43,Clayey,Paddy,10,8,29,14-35-14
30,60,40,Sandy,Millets,41,0,0,Urea
29,58,65,Black,Cotton,14,0,35,DAP
26,52,59,Loamy,Sugarcane,11,0,9,20-20
31,62,44,Sandy,Barley,21,0,28,28-28
35,67,28,Clayey,Pulses,8,7,31,14-35-14
29,58,30,Red,Tobacco,13,17,16,10-26-26
27,53,30,Black,Millets,35,0,0,Urea
36,68,50,Loamy,Wheat,12,18,19,10-26-26
29,58,61,Loamy,Cotton,11,0,38,DAP
30,60,26,Black,Oil seeds,8,9,30,14-35-14
34,65,45,Clayey,Paddy,6,19,21,10-26-26
36,68,41,Red,Ground Nuts,41,0,0,Urea
28,54,25,Sandy,Maize,9,10,30,14-35-14
25,50,32,Clayey,Pulses,24,0,19,28-28
30,60,27,Red,Tobacco,4,17,17,10-26-26
38,72,51,Loamy,Wheat,39,0,0,Urea
36,60,43,Sandy,Millets,15,0,41,DAP
29,58,57,Black,Sugarcane,12,0,10,20-20
1 Temparature Humidity Moisture Soil Type Crop Type Nitrogen Potassium Phosphorous Fertilizer Name
2 26 52 38 Sandy Maize 37 0 0 Urea
3 29 52 45 Loamy Sugarcane 12 0 36 DAP
4 34 65 62 Black Cotton 7 9 30 14-35-14
5 32 62 34 Red Tobacco 22 0 20 28-28
6 28 54 46 Clayey Paddy 35 0 0 Urea
7 26 52 35 Sandy Barley 12 10 13 17-17-17
8 25 50 64 Red Cotton 9 0 10 20-20
9 33 64 50 Loamy Wheat 41 0 0 Urea
10 30 60 42 Sandy Millets 21 0 18 28-28
11 29 58 33 Black Oil seeds 9 7 30 14-35-14
12 27 54 28 Clayey Pulses 13 0 40 DAP
13 31 62 48 Sandy Maize 14 15 12 17-17-17
14 25 50 65 Loamy Cotton 36 0 0 Urea
15 32 62 41 Clayey Paddy 24 0 22 28-28
16 26 52 31 Red Ground Nuts 14 0 41 DAP
17 31 62 49 Black Sugarcane 10 13 14 17-17-17
18 33 64 34 Clayey Pulses 38 0 0 Urea
19 25 50 39 Sandy Barley 21 0 19 28-28
20 28 54 65 Black Cotton 39 0 0 Urea
21 29 58 52 Loamy Wheat 13 0 36 DAP
22 30 60 44 Sandy Millets 10 0 9 20-20
23 34 65 53 Loamy Sugarcane 12 14 12 17-17-17
24 35 68 33 Red Tobacco 11 0 37 DAP
25 28 54 37 Black Millets 36 0 0 Urea
26 33 64 39 Clayey Paddy 13 0 10 20-20
27 26 52 44 Sandy Maize 23 0 20 28-28
28 30 60 63 Red Cotton 9 9 29 14-35-14
29 32 62 30 Loamy Sugarcane 38 0 0 Urea
30 37 70 32 Black Oil seeds 12 0 39 DAP
31 26 52 36 Clayey Pulses 14 0 13 20-20
32 29 58 40 Red Ground Nuts 24 0 23 28-28
33 30 60 27 Loamy Sugarcane 12 0 40 DAP
34 34 65 38 Clayey Paddy 39 0 0 Urea
35 36 68 38 Sandy Barley 7 9 30 14-35-14
36 26 52 48 Loamy Wheat 23 0 19 28-28
37 28 54 35 Black Millets 41 0 0 Urea
38 30 60 61 Loamy Cotton 8 10 31 14-35-14
39 37 70 37 Clayey Paddy 12 0 41 DAP
40 25 50 26 Red Ground Nuts 15 14 11 17-17-17
41 29 58 34 Sandy Millets 15 0 37 DAP
42 27 54 30 Clayey Pulses 13 0 13 20-20
43 30 60 58 Loamy Sugarcane 10 7 32 14-35-14
44 32 62 34 Red Tobacco 22 0 24 28-28
45 34 65 60 Black Sugarcane 35 0 0 Urea
46 35 67 42 Sandy Barley 10 0 35 DAP
47 38 70 48 Loamy Wheat 8 8 28 14-35-14
48 26 52 32 Black Oil seeds 12 0 8 20-20
49 29 58 43 Clayey Paddy 24 0 18 28-28
50 30 60 29 Red Ground Nuts 41 0 0 Urea
51 33 64 51 Sandy Maize 5 9 29 14-35-14
52 34 65 31 Red Tobacco 23 0 21 28-28
53 36 68 33 Black Oil seeds 13 0 14 20-20
54 28 54 38 Clayey Pulses 40 0 0 Urea
55 30 60 47 Sandy Barley 12 0 42 DAP
56 31 62 63 Red Cotton 11 12 15 17-17-17
57 27 53 43 Black Millets 23 0 24 28-28
58 34 65 54 Loamy Wheat 38 0 0 Urea
59 29 58 37 Sandy Millets 8 0 15 20-20
60 25 50 56 Loamy Sugarcane 11 13 15 17-17-17
61 32 62 34 Red Ground Nuts 15 0 37 DAP
62 28 54 41 Clayey Paddy 36 0 0 Urea
63 30 60 49 Loamy Wheat 13 0 9 20-20
64 34 65 64 Black Cotton 24 0 20 28-28
65 28 54 47 Sandy Barley 5 18 15 10-26-26
66 27 53 35 Black Oil seeds 37 0 0 Urea
67 36 68 62 Red Cotton 15 0 40 DAP
68 34 65 57 Black Sugarcane 9 0 13 20-20
69 29 58 55 Loamy Sugarcane 8 8 33 14-35-14
70 25 50 40 Clayey Pulses 6 19 16 10-26-26
71 30 60 38 Sandy Millets 10 0 14 20-20
72 26 52 39 Clayey Pulses 21 0 23 28-28
73 31 62 32 Red Tobacco 39 0 0 Urea
74 34 65 48 Loamy Wheat 23 0 19 28-28
75 27 53 34 Black Oil seeds 42 0 0 Urea
76 33 64 31 Red Ground Nuts 13 0 39 DAP
77 29 58 42 Clayey Paddy 9 10 22 14-35-14
78 30 60 47 Sandy Maize 22 0 21 28-28
79 27 53 59 Loamy Sugarcane 10 0 15 20-20
80 26 52 36 Clayey Pulses 7 16 20 10-26-26
81 34 65 63 Red Cotton 14 0 38 DAP
82 28 54 43 Clayey Paddy 10 8 29 14-35-14
83 30 60 40 Sandy Millets 41 0 0 Urea
84 29 58 65 Black Cotton 14 0 35 DAP
85 26 52 59 Loamy Sugarcane 11 0 9 20-20
86 31 62 44 Sandy Barley 21 0 28 28-28
87 35 67 28 Clayey Pulses 8 7 31 14-35-14
88 29 58 30 Red Tobacco 13 17 16 10-26-26
89 27 53 30 Black Millets 35 0 0 Urea
90 36 68 50 Loamy Wheat 12 18 19 10-26-26
91 29 58 61 Loamy Cotton 11 0 38 DAP
92 30 60 26 Black Oil seeds 8 9 30 14-35-14
93 34 65 45 Clayey Paddy 6 19 21 10-26-26
94 36 68 41 Red Ground Nuts 41 0 0 Urea
95 28 54 25 Sandy Maize 9 10 30 14-35-14
96 25 50 32 Clayey Pulses 24 0 19 28-28
97 30 60 27 Red Tobacco 4 17 17 10-26-26
98 38 72 51 Loamy Wheat 39 0 0 Urea
99 36 60 43 Sandy Millets 15 0 41 DAP
100 29 58 57 Black Sugarcane 12 0 10 20-20

BIN
Game1/Content/ML/MLmodel Normal file

Binary file not shown.

BIN
Game1/Content/ML/MLmodelBig Normal file

Binary file not shown.

3
Game1/Content/ML/report Normal file
View File

@ -0,0 +1,3 @@
Micro Accuracy: 0.95829
LogLoss Average: 0.100171
LogLoss Reduction: 0.933795

View File

@ -0,0 +1,3 @@
Micro Accuracy: 1
LogLoss Average: 0.002345
LogLoss Reduction: 0.998302

BIN
Game1/Content/MLmodel Normal file

Binary file not shown.

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.props" Condition="Exists('..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.props')" />
<Import Project="..\packages\Microsoft.ML.CpuMath.1.4.0\build\netstandard2.0\Microsoft.ML.CpuMath.props" Condition="Exists('..\packages\Microsoft.ML.CpuMath.1.4.0\build\netstandard2.0\Microsoft.ML.CpuMath.props')" />
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -21,7 +19,7 @@
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
@ -45,10 +43,40 @@
<PropertyGroup> <PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Game1.cs" /> <Compile Include="Game1.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Sources\ML\InOut\BigModelInput.cs" />
<Compile Include="Sources\ML\InOut\BigModelOutput.cs" />
<Compile Include="Sources\ML\MLModel.cs" />
<Compile Include="Sources\ML\InOut\ModelOutput.cs" />
<Compile Include="Sources\ML\InOut\ModelInput.cs" />
<Compile Include="Sources\Objects\House.cs" /> <Compile Include="Sources\Objects\House.cs" />
<Compile Include="Sources\Crops\Crops.cs" /> <Compile Include="Sources\Crops\Crops.cs" />
<Compile Include="Sources\Crops\Farm.cs" /> <Compile Include="Sources\Crops\Farm.cs" />
@ -67,59 +95,11 @@
<Compile Include="Sources\Objects\Tractor.cs" /> <Compile Include="Sources\Objects\Tractor.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.ML.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.1.4.0\lib\netstandard2.0\Microsoft.ML.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.CpuMath, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.CpuMath.1.4.0\lib\netstandard2.0\Microsoft.ML.CpuMath.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.1.4.0\lib\netstandard2.0\Microsoft.ML.Data.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.DataView, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.DataView.1.4.0\lib\netstandard2.0\Microsoft.ML.DataView.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.KMeansClustering, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.1.4.0\lib\netstandard2.0\Microsoft.ML.KMeansClustering.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.PCA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.1.4.0\lib\netstandard2.0\Microsoft.ML.PCA.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.StandardTrainers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.1.4.0\lib\netstandard2.0\Microsoft.ML.StandardTrainers.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.Transforms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.1.4.0\lib\netstandard2.0\Microsoft.ML.Transforms.dll</HintPath>
</Reference>
<Reference Include="MonoGame.Framework"> <Reference Include="MonoGame.Framework">
<HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll</HintPath> <HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.CodeDom, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.CodeDom.4.4.0\lib\net461\System.CodeDom.dll</HintPath>
</Reference>
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" /> <Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Dataflow, Version=4.6.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Dataflow.4.8.0\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll</HintPath>
</Reference>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -134,27 +114,61 @@
<Content Include="Content\tileunplantable.png" /> <Content Include="Content\tileunplantable.png" />
<Content Include="Content\Tractor.png" /> <Content Include="Content\Tractor.png" />
<Content Include="Icon.ico" /> <Content Include="Icon.ico" />
<None Include="Resources\TextFile1.txt" />
<None Include="Sources\ML\Data\FertPredictDataset.csv" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<MonoGameContentReference Include="Content\Content.mgcb" /> <MonoGameContentReference Include="Content\Content.mgcb" />
<None Include="app.config" /> <None Include="app.config" />
<None Include="app.manifest" /> <None Include="app.manifest" />
<None Include="packages.config" /> <None Include="Sources\ML\Data\Fertilizer Prediction.csv" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Sources\ML\Data\" /> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="LightGBM">
<Version>2.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.ML">
<Version>1.4.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.ML.CpuMath">
<Version>1.4.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.ML.FastTree">
<Version>1.4.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.ML.LightGbm">
<Version>1.4.0</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="System.CodeDom">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Collections.Immutable">
<Version>1.7.0</Version>
</PackageReference>
<PackageReference Include="System.Memory">
<Version>4.5.4</Version>
</PackageReference>
<PackageReference Include="System.Reflection.Emit.Lightweight">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="System.Runtime.CompilerServices.Unsafe">
<Version>4.7.1</Version>
</PackageReference>
<PackageReference Include="System.Threading.Tasks.Dataflow">
<Version>4.11.0</Version>
</PackageReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" /> <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.ML.CpuMath.1.4.0\build\netstandard2.0\Microsoft.ML.CpuMath.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.CpuMath.1.4.0\build\netstandard2.0\Microsoft.ML.CpuMath.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.targets'))" />
</Target>
<Import Project="..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.targets" Condition="Exists('..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">

84
Game1/Properties/Resources.Designer.cs generated Normal file
View File

@ -0,0 +1,84 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Game1.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Game1.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Temparature,Humidity ,Moisture,Soil Type,Crop Type,Nitrogen,Potassium,Phosphorous,Fertilizer Name
///26,52,38,Sandy,Maize,37,0,0,Urea
///29,52,45,Loamy,Sugarcane,12,0,36,DAP
///34,65,62,Black,Cotton,7,9,30,14-35-14
///32,62,34,Red,Tobacco,22,0,20,28-28
///28,54,46,Clayey,Paddy,35,0,0,Urea
///26,52,35,Sandy,Barley,12,10,13,17-17-17
///25,50,64,Red,Cotton,9,0,10,20-20
///33,64,50,Loamy,Wheat,41,0,0,Urea
///30,60,42,Sandy,Millets,21,0,18,28-28
///29,58,33,Black,Oil seeds,9,7,30,14-35-14
///27,54,28,Clayey,Pulses,13,0,40,DAP
///31,62, [rest of string was truncated]&quot;;.
/// </summary>
internal static string Fertilizer_Prediction {
get {
return ResourceManager.GetString("Fertilizer_Prediction", resourceCulture);
}
}
}
}

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Fertilizer_Prediction" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\sources\ml\data\fertilizer prediction.csv;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
</root>

View File

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,100 @@
Temparature,Humidity ,Moisture,Soil Type,Crop Type,Nitrogen,Potassium,Phosphorous,Fertilizer Name
26,52,38,Sandy,Maize,37,0,0,Urea
29,52,45,Loamy,Sugarcane,12,0,36,DAP
34,65,62,Black,Cotton,7,9,30,14-35-14
32,62,34,Red,Tobacco,22,0,20,28-28
28,54,46,Clayey,Paddy,35,0,0,Urea
26,52,35,Sandy,Barley,12,10,13,17-17-17
25,50,64,Red,Cotton,9,0,10,20-20
33,64,50,Loamy,Wheat,41,0,0,Urea
30,60,42,Sandy,Millets,21,0,18,28-28
29,58,33,Black,Oil seeds,9,7,30,14-35-14
27,54,28,Clayey,Pulses,13,0,40,DAP
31,62,48,Sandy,Maize,14,15,12,17-17-17
25,50,65,Loamy,Cotton,36,0,0,Urea
32,62,41,Clayey,Paddy,24,0,22,28-28
26,52,31,Red,Ground Nuts,14,0,41,DAP
31,62,49,Black,Sugarcane,10,13,14,17-17-17
33,64,34,Clayey,Pulses,38,0,0,Urea
25,50,39,Sandy,Barley,21,0,19,28-28
28,54,65,Black,Cotton,39,0,0,Urea
29,58,52,Loamy,Wheat,13,0,36,DAP
30,60,44,Sandy,Millets,10,0,9,20-20
34,65,53,Loamy,Sugarcane,12,14,12,17-17-17
35,68,33,Red,Tobacco,11,0,37,DAP
28,54,37,Black,Millets,36,0,0,Urea
33,64,39,Clayey,Paddy,13,0,10,20-20
26,52,44,Sandy,Maize,23,0,20,28-28
30,60,63,Red,Cotton,9,9,29,14-35-14
32,62,30,Loamy,Sugarcane,38,0,0,Urea
37,70,32,Black,Oil seeds,12,0,39,DAP
26,52,36,Clayey,Pulses,14,0,13,20-20
29,58,40,Red,Ground Nuts,24,0,23,28-28
30,60,27,Loamy,Sugarcane,12,0,40,DAP
34,65,38,Clayey,Paddy,39,0,0,Urea
36,68,38,Sandy,Barley,7,9,30,14-35-14
26,52,48,Loamy,Wheat,23,0,19,28-28
28,54,35,Black,Millets,41,0,0,Urea
30,60,61,Loamy,Cotton,8,10,31,14-35-14
37,70,37,Clayey,Paddy,12,0,41,DAP
25,50,26,Red,Ground Nuts,15,14,11,17-17-17
29,58,34,Sandy,Millets,15,0,37,DAP
27,54,30,Clayey,Pulses,13,0,13,20-20
30,60,58,Loamy,Sugarcane,10,7,32,14-35-14
32,62,34,Red,Tobacco,22,0,24,28-28
34,65,60,Black,Sugarcane,35,0,0,Urea
35,67,42,Sandy,Barley,10,0,35,DAP
38,70,48,Loamy,Wheat,8,8,28,14-35-14
26,52,32,Black,Oil seeds,12,0,8,20-20
29,58,43,Clayey,Paddy,24,0,18,28-28
30,60,29,Red,Ground Nuts,41,0,0,Urea
33,64,51,Sandy,Maize,5,9,29,14-35-14
34,65,31,Red,Tobacco,23,0,21,28-28
36,68,33,Black,Oil seeds,13,0,14,20-20
28,54,38,Clayey,Pulses,40,0,0,Urea
30,60,47,Sandy,Barley,12,0,42,DAP
31,62,63,Red,Cotton,11,12,15,17-17-17
27,53,43,Black,Millets,23,0,24,28-28
34,65,54,Loamy,Wheat,38,0,0,Urea
29,58,37,Sandy,Millets,8,0,15,20-20
25,50,56,Loamy,Sugarcane,11,13,15,17-17-17
32,62,34,Red,Ground Nuts,15,0,37,DAP
28,54,41,Clayey,Paddy,36,0,0,Urea
30,60,49,Loamy,Wheat,13,0,9,20-20
34,65,64,Black,Cotton,24,0,20,28-28
28,54,47,Sandy,Barley,5,18,15,10-26-26
27,53,35,Black,Oil seeds,37,0,0,Urea
36,68,62,Red,Cotton,15,0,40,DAP
34,65,57,Black,Sugarcane,9,0,13,20-20
29,58,55,Loamy,Sugarcane,8,8,33,14-35-14
25,50,40,Clayey,Pulses,6,19,16,10-26-26
30,60,38,Sandy,Millets,10,0,14,20-20
26,52,39,Clayey,Pulses,21,0,23,28-28
31,62,32,Red,Tobacco,39,0,0,Urea
34,65,48,Loamy,Wheat,23,0,19,28-28
27,53,34,Black,Oil seeds,42,0,0,Urea
33,64,31,Red,Ground Nuts,13,0,39,DAP
29,58,42,Clayey,Paddy,9,10,22,14-35-14
30,60,47,Sandy,Maize,22,0,21,28-28
27,53,59,Loamy,Sugarcane,10,0,15,20-20
26,52,36,Clayey,Pulses,7,16,20,10-26-26
34,65,63,Red,Cotton,14,0,38,DAP
28,54,43,Clayey,Paddy,10,8,29,14-35-14
30,60,40,Sandy,Millets,41,0,0,Urea
29,58,65,Black,Cotton,14,0,35,DAP
26,52,59,Loamy,Sugarcane,11,0,9,20-20
31,62,44,Sandy,Barley,21,0,28,28-28
35,67,28,Clayey,Pulses,8,7,31,14-35-14
29,58,30,Red,Tobacco,13,17,16,10-26-26
27,53,30,Black,Millets,35,0,0,Urea
36,68,50,Loamy,Wheat,12,18,19,10-26-26
29,58,61,Loamy,Cotton,11,0,38,DAP
30,60,26,Black,Oil seeds,8,9,30,14-35-14
34,65,45,Clayey,Paddy,6,19,21,10-26-26
36,68,41,Red,Ground Nuts,41,0,0,Urea
28,54,25,Sandy,Maize,9,10,30,14-35-14
25,50,32,Clayey,Pulses,24,0,19,28-28
30,60,27,Red,Tobacco,4,17,17,10-26-26
38,72,51,Loamy,Wheat,39,0,0,Urea
36,60,43,Sandy,Millets,15,0,41,DAP
29,58,57,Black,Sugarcane,12,0,10,20-20
1 Temparature Humidity Moisture Soil Type Crop Type Nitrogen Potassium Phosphorous Fertilizer Name
2 26 52 38 Sandy Maize 37 0 0 Urea
3 29 52 45 Loamy Sugarcane 12 0 36 DAP
4 34 65 62 Black Cotton 7 9 30 14-35-14
5 32 62 34 Red Tobacco 22 0 20 28-28
6 28 54 46 Clayey Paddy 35 0 0 Urea
7 26 52 35 Sandy Barley 12 10 13 17-17-17
8 25 50 64 Red Cotton 9 0 10 20-20
9 33 64 50 Loamy Wheat 41 0 0 Urea
10 30 60 42 Sandy Millets 21 0 18 28-28
11 29 58 33 Black Oil seeds 9 7 30 14-35-14
12 27 54 28 Clayey Pulses 13 0 40 DAP
13 31 62 48 Sandy Maize 14 15 12 17-17-17
14 25 50 65 Loamy Cotton 36 0 0 Urea
15 32 62 41 Clayey Paddy 24 0 22 28-28
16 26 52 31 Red Ground Nuts 14 0 41 DAP
17 31 62 49 Black Sugarcane 10 13 14 17-17-17
18 33 64 34 Clayey Pulses 38 0 0 Urea
19 25 50 39 Sandy Barley 21 0 19 28-28
20 28 54 65 Black Cotton 39 0 0 Urea
21 29 58 52 Loamy Wheat 13 0 36 DAP
22 30 60 44 Sandy Millets 10 0 9 20-20
23 34 65 53 Loamy Sugarcane 12 14 12 17-17-17
24 35 68 33 Red Tobacco 11 0 37 DAP
25 28 54 37 Black Millets 36 0 0 Urea
26 33 64 39 Clayey Paddy 13 0 10 20-20
27 26 52 44 Sandy Maize 23 0 20 28-28
28 30 60 63 Red Cotton 9 9 29 14-35-14
29 32 62 30 Loamy Sugarcane 38 0 0 Urea
30 37 70 32 Black Oil seeds 12 0 39 DAP
31 26 52 36 Clayey Pulses 14 0 13 20-20
32 29 58 40 Red Ground Nuts 24 0 23 28-28
33 30 60 27 Loamy Sugarcane 12 0 40 DAP
34 34 65 38 Clayey Paddy 39 0 0 Urea
35 36 68 38 Sandy Barley 7 9 30 14-35-14
36 26 52 48 Loamy Wheat 23 0 19 28-28
37 28 54 35 Black Millets 41 0 0 Urea
38 30 60 61 Loamy Cotton 8 10 31 14-35-14
39 37 70 37 Clayey Paddy 12 0 41 DAP
40 25 50 26 Red Ground Nuts 15 14 11 17-17-17
41 29 58 34 Sandy Millets 15 0 37 DAP
42 27 54 30 Clayey Pulses 13 0 13 20-20
43 30 60 58 Loamy Sugarcane 10 7 32 14-35-14
44 32 62 34 Red Tobacco 22 0 24 28-28
45 34 65 60 Black Sugarcane 35 0 0 Urea
46 35 67 42 Sandy Barley 10 0 35 DAP
47 38 70 48 Loamy Wheat 8 8 28 14-35-14
48 26 52 32 Black Oil seeds 12 0 8 20-20
49 29 58 43 Clayey Paddy 24 0 18 28-28
50 30 60 29 Red Ground Nuts 41 0 0 Urea
51 33 64 51 Sandy Maize 5 9 29 14-35-14
52 34 65 31 Red Tobacco 23 0 21 28-28
53 36 68 33 Black Oil seeds 13 0 14 20-20
54 28 54 38 Clayey Pulses 40 0 0 Urea
55 30 60 47 Sandy Barley 12 0 42 DAP
56 31 62 63 Red Cotton 11 12 15 17-17-17
57 27 53 43 Black Millets 23 0 24 28-28
58 34 65 54 Loamy Wheat 38 0 0 Urea
59 29 58 37 Sandy Millets 8 0 15 20-20
60 25 50 56 Loamy Sugarcane 11 13 15 17-17-17
61 32 62 34 Red Ground Nuts 15 0 37 DAP
62 28 54 41 Clayey Paddy 36 0 0 Urea
63 30 60 49 Loamy Wheat 13 0 9 20-20
64 34 65 64 Black Cotton 24 0 20 28-28
65 28 54 47 Sandy Barley 5 18 15 10-26-26
66 27 53 35 Black Oil seeds 37 0 0 Urea
67 36 68 62 Red Cotton 15 0 40 DAP
68 34 65 57 Black Sugarcane 9 0 13 20-20
69 29 58 55 Loamy Sugarcane 8 8 33 14-35-14
70 25 50 40 Clayey Pulses 6 19 16 10-26-26
71 30 60 38 Sandy Millets 10 0 14 20-20
72 26 52 39 Clayey Pulses 21 0 23 28-28
73 31 62 32 Red Tobacco 39 0 0 Urea
74 34 65 48 Loamy Wheat 23 0 19 28-28
75 27 53 34 Black Oil seeds 42 0 0 Urea
76 33 64 31 Red Ground Nuts 13 0 39 DAP
77 29 58 42 Clayey Paddy 9 10 22 14-35-14
78 30 60 47 Sandy Maize 22 0 21 28-28
79 27 53 59 Loamy Sugarcane 10 0 15 20-20
80 26 52 36 Clayey Pulses 7 16 20 10-26-26
81 34 65 63 Red Cotton 14 0 38 DAP
82 28 54 43 Clayey Paddy 10 8 29 14-35-14
83 30 60 40 Sandy Millets 41 0 0 Urea
84 29 58 65 Black Cotton 14 0 35 DAP
85 26 52 59 Loamy Sugarcane 11 0 9 20-20
86 31 62 44 Sandy Barley 21 0 28 28-28
87 35 67 28 Clayey Pulses 8 7 31 14-35-14
88 29 58 30 Red Tobacco 13 17 16 10-26-26
89 27 53 30 Black Millets 35 0 0 Urea
90 36 68 50 Loamy Wheat 12 18 19 10-26-26
91 29 58 61 Loamy Cotton 11 0 38 DAP
92 30 60 26 Black Oil seeds 8 9 30 14-35-14
93 34 65 45 Clayey Paddy 6 19 21 10-26-26
94 36 68 41 Red Ground Nuts 41 0 0 Urea
95 28 54 25 Sandy Maize 9 10 30 14-35-14
96 25 50 32 Clayey Pulses 24 0 19 28-28
97 30 60 27 Red Tobacco 4 17 17 10-26-26
98 38 72 51 Loamy Wheat 39 0 0 Urea
99 36 60 43 Sandy Millets 15 0 41 DAP
100 29 58 57 Black Sugarcane 12 0 10 20-20

View File

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.ML.Data;
namespace Game1.Sources.ML
{
class BigModelInput
{
[ColumnName("Ca"), LoadColumn(0)]
public float Ca { get; set; }
[ColumnName("Mg"), LoadColumn(1)]
public float Mg { get; set; }
[ColumnName("K"), LoadColumn(2)]
public float K { get; set; }
[ColumnName("S"), LoadColumn(3)]
public float S { get; set; }
[ColumnName("N"), LoadColumn(4)]
public float N { get; set; }
[ColumnName("Lime"), LoadColumn(5)]
public float Lime { get; set; }
[ColumnName("C"), LoadColumn(6)]
public float C { get; set; }
[ColumnName("P"), LoadColumn(7)]
public float P { get; set; }
[ColumnName("Moisture"), LoadColumn(8)]
public float Moisture { get; set; }
[ColumnName("Class"), LoadColumn(9)]
public float Class { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.ML.Data;
namespace Game1.Sources.ML
{
class BigModelOutput
{
[ColumnName("PredictedLabel")]
public float Prediction { get; set; }
}
}

View File

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.ML;
using Microsoft.ML.Data;
namespace Game1.Sources.ML
{
class ModelInput
{
[ColumnName("Temperature"), LoadColumn(0)]
public float Temperature { get; set; }
[ColumnName("Humidity"), LoadColumn(1)]
public float Humidity { get; set; }
[ColumnName("Moisture"), LoadColumn(2)]
public float Moisture { get; set; }
[ColumnName("Soil_Type"), LoadColumn(3)]
public String Soil_Type { get; set; }
[ColumnName("Crop_Type"), LoadColumn(4)]
public String Crop_Type { get; set; }
[ColumnName("Nitrogen"), LoadColumn(5)]
public float Nitrogen { get; set; }
[ColumnName("Potassium"), LoadColumn(6)]
public float Potassium { get; set; }
[ColumnName("Phosphorous"), LoadColumn(7)]
public float Phosporous { get; set; }
[ColumnName("Fertilizer_Name"), LoadColumn(8)]
public String Fertilizer_Name { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.ML.Data;
namespace Game1.Sources.ML
{
class ModelOutput
{
[ColumnName("PredictedLabel")]
public String Prediction { get; set; }
//public float[] Score { get; set; }
}
}

180
Game1/Sources/ML/MLModel.cs Normal file
View File

@ -0,0 +1,180 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Diagnostics;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.ML;
using Microsoft.ML.Data;
using Microsoft.ML.Trainers.LightGbm;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Game1;
namespace Game1.Sources.ML
{
class MLModel
{
private static MLContext mlContext = new MLContext(seed: 1);
private static string path = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/Fertilizer_Prediction.csv";
private static string modelpath = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/MLmodel";
private static string report = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/report";
private static string pathBig = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/BigFertPredict.csv";
private static string modelpathBig = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/MLmodelBig";
private static string reportBig = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/report_BigModel";
public static void CreateModel()
{
IDataView trainingDataView = mlContext.Data.LoadFromTextFile<ModelInput>(
path: path,
hasHeader: true,
separatorChar: ',',
allowQuoting: true,
allowSparse: false);
ModelInput sample = mlContext.Data.CreateEnumerable<ModelInput>(trainingDataView, false).ElementAt(0);
ITransformer MLModel = BuildAndTrain(mlContext, trainingDataView, sample, report);
SaveModel(mlContext, MLModel, modelpath, trainingDataView.Schema);
}
public static void CreateBigModel()
{
IDataView trainingDataView = mlContext.Data.LoadFromTextFile<BigModelInput>(
path: pathBig,
hasHeader: true,
separatorChar: ',',
allowQuoting: true,
allowSparse: false);
BigModelInput sample = mlContext.Data.CreateEnumerable<BigModelInput>(trainingDataView, false).ElementAt(0);
ITransformer MLModel = BuildAndTrain(mlContext, trainingDataView, sample, reportBig);
SaveModel(mlContext, MLModel, modelpathBig, trainingDataView.Schema);
}
public static ITransformer BuildAndTrain(MLContext mLContext, IDataView trainingDataView, ModelInput sample, string reportPath)
{
var options = new LightGbmMulticlassTrainer.Options
{
MaximumBinCountPerFeature = 8,
LearningRate = 0.00025,
NumberOfIterations = 40000,
NumberOfLeaves = 10,
LabelColumnName = "Fertilizer_NameF",
FeatureColumnName = "Features",
Booster = new DartBooster.Options()
{
MaximumTreeDepth = 10
}
};
var pipeline = mlContext.Transforms
.Text.FeaturizeText("Soil_TypeF", "Soil_Type")
.Append(mlContext.Transforms.Text.FeaturizeText("Crop_TypeF", "Crop_Type"))
.Append(mlContext.Transforms.Concatenate("Features", "Temperature", "Humidity", "Moisture", "Soil_TypeF", "Crop_TypeF", "Nitrogen", "Potassium", "Phosphorous"))
.Append(mLContext.Transforms.NormalizeMinMax("Features"))
.Append(mlContext.Transforms.Conversion.MapValueToKey("Fertilizer_NameF", "Fertilizer_Name"), TransformerScope.TrainTest)
.AppendCacheCheckpoint(mLContext)
.Append(mLContext.MulticlassClassification.Trainers.LightGbm(options))
.Append(mlContext.Transforms.Conversion.MapKeyToValue("PredictedLabel", "PredictedLabel"));
Evaluate(mlContext, trainingDataView, pipeline, 10, reportPath, "Fertilizer_NameF");
ITransformer MLModel = pipeline.Fit(trainingDataView);
var predEng = mlContext.Model.CreatePredictionEngine<ModelInput, ModelOutput>(MLModel);
ModelOutput predResult = predEng.Predict(sample);
ModelOutput predResult2 = predEng.Predict(new ModelInput()
{
Temperature = 24,
Humidity = 59,
Moisture = 57,
Soil_Type = "Loamy",
Crop_Type = "Sugarcane",
Nitrogen = 34,
Potassium = 0,
Phosporous = 3
});
return MLModel;
}
public static ITransformer BuildAndTrain(MLContext mLContext, IDataView trainingDataView, BigModelInput sample, string reportPath)
{
var options = new LightGbmMulticlassTrainer.Options
{
MaximumBinCountPerFeature = 10,
LearningRate = 0.001,
NumberOfIterations = 10000,
NumberOfLeaves = 12,
LabelColumnName = "ClassF",
FeatureColumnName = "Features",
Booster = new DartBooster.Options()
{
MaximumTreeDepth = 12
}
};
var pipeline = mlContext.Transforms
.Concatenate("Features", "Ca", "Mg", "K", "S", "N", "Lime", "C", "P", "Moisture")
.Append(mLContext.Transforms.NormalizeMinMax("Features"))
.Append(mlContext.Transforms.Conversion.MapValueToKey("ClassF", "Class"), TransformerScope.TrainTest)
.AppendCacheCheckpoint(mLContext)
.Append(mLContext.MulticlassClassification.Trainers.LightGbm(options))
.Append(mlContext.Transforms.Conversion.MapKeyToValue("PredictedLabel", "PredictedLabel"));
Evaluate(mlContext, trainingDataView, pipeline, 8, reportPath, "ClassF");
ITransformer MLModel = pipeline.Fit(trainingDataView);
var predEng = mlContext.Model.CreatePredictionEngine<BigModelInput, BigModelOutput>(MLModel);
BigModelOutput predResult = predEng.Predict(sample);
return MLModel;
}
public static ITransformer TrainModel(MLContext mlContext, IDataView trainingDataView, IEstimator<ITransformer> trainingPipeline)
{
ITransformer model = trainingPipeline.Fit(trainingDataView);
return model;
}
public static void Evaluate(MLContext mlContext, IDataView trainingDataView, IEstimator<ITransformer> trainingPipeline, int folds, string reportPath, string labelColumnName)
{
var crossVal = mlContext.MulticlassClassification.CrossValidate(trainingDataView, trainingPipeline, numberOfFolds: folds, labelColumnName: labelColumnName);
var metricsInMultipleFolds = crossVal.Select(r => r.Metrics);
var MicroAccuracyValues = metricsInMultipleFolds.Select(m => m.MicroAccuracy);
var LogLossValues = metricsInMultipleFolds.Select(m => m.LogLoss);
var LogLossReductionValues = metricsInMultipleFolds.Select(m => m.LogLossReduction);
string MicroAccuracyAverage = MicroAccuracyValues.Average().ToString("0.######");
string LogLossAvg = LogLossValues.Average().ToString("0.######");
string LogLossReductionAvg = LogLossReductionValues.Average().ToString("0.######");
var report = File.CreateText(reportPath);
report.Write("Micro Accuracy: " + MicroAccuracyAverage +'\n'+ "LogLoss Average: " + LogLossAvg +'\n'+ "LogLoss Reduction: " + LogLossReductionAvg, 0, 0);
report.Flush();
report.Close();
}
public static void SaveModel(MLContext mlContext, ITransformer Model, string modelPath, DataViewSchema modelInputSchema)
{
mlContext.Model.Save(Model, modelInputSchema, modelPath);
}
public static ITransformer LoadModel(bool isBig)
{
if (isBig)
return mlContext.Model.Load(modelpathBig, out DataViewSchema inputSchema);
else
return mlContext.Model.Load(modelpath, out DataViewSchema inputSchema);
}
}
}

View File

@ -4,6 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using Game1.Sources.ML;
class Astar class Astar
{ {

View File

@ -1,3 +1,28 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.5.0" newVersion="1.2.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Dataflow" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.6.5.0" newVersion="4.6.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.ML" version="1.4.0" targetFramework="net461" />
<package id="Microsoft.ML.CpuMath" version="1.4.0" targetFramework="net461" />
<package id="Microsoft.ML.DataView" version="1.4.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" />
<package id="System.Buffers" version="4.4.0" targetFramework="net461" />
<package id="System.CodeDom" version="4.4.0" targetFramework="net461" />
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" />
<package id="System.Memory" version="4.5.1" targetFramework="net461" />
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net461" />
<package id="System.Reflection.Emit.Lightweight" version="4.3.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.0" targetFramework="net461" />
<package id="System.Threading.Tasks.Dataflow" version="4.8.0" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,210 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\LightGBM.2.3.1\build\LightGBM.props" Condition="Exists('..\packages\LightGBM.2.3.1\build\LightGBM.props')" />
<Import Project="..\packages\Microsoft.ML.FastTree.1.4.0\build\netstandard2.0\Microsoft.ML.FastTree.props" Condition="Exists('..\packages\Microsoft.ML.FastTree.1.4.0\build\netstandard2.0\Microsoft.ML.FastTree.props')" />
<Import Project="..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.props" Condition="Exists('..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.props')" />
<Import Project="..\packages\Microsoft.ML.CpuMath.1.4.0\build\netstandard2.0\Microsoft.ML.CpuMath.props" Condition="Exists('..\packages\Microsoft.ML.CpuMath.1.4.0\build\netstandard2.0\Microsoft.ML.CpuMath.props')" />
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{650E4519-2DEF-496F-AC3B-3C794DC7CF0D}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Game1</RootNamespace>
<AssemblyName>Game1</AssemblyName>
<FileAlignment>512</FileAlignment>
<MonoGamePlatform>Windows</MonoGamePlatform>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath>
<DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Compile Include="Game1.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Sources\ML\MLModel.cs" />
<Compile Include="Sources\ML\ModelOutput.cs" />
<Compile Include="Sources\ML\ModelInput.cs" />
<Compile Include="Sources\Objects\House.cs" />
<Compile Include="Sources\Crops\Crops.cs" />
<Compile Include="Sources\Crops\Farm.cs" />
<Compile Include="Sources\Controlls\Input.cs" />
<Compile Include="Sources\Objects\Inventory.cs" />
<Compile Include="Sources\Objects\tractorPositionCorrector.cs" />
<Compile Include="Sources\Pathing\A-Star\Astar.cs" />
<Compile Include="Sources\Pathing\A-Star\PathSaver\MinHeap.cs" />
<Compile Include="Sources\Pathing\A-Star\PathSaver\Nodes.cs" />
<Compile Include="Sources\Pathing\A-Star\PathSaver\Path.cs" />
<Compile Include="Sources\Pathing\A-Star\PathSaver\PriorityQueue.cs" />
<Compile Include="Sources\Controlls\Controller.cs" />
<Compile Include="Sources\Smart\AI.cs" />
<Compile Include="Sources\Smart\ScoreSystem.cs" />
<Compile Include="Sources\Smart\SmartTractor.cs" />
<Compile Include="Sources\Objects\Tractor.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.ML.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.1.4.0\lib\netstandard2.0\Microsoft.ML.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.CpuMath, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.CpuMath.1.4.0\lib\netstandard2.0\Microsoft.ML.CpuMath.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.1.4.0\lib\netstandard2.0\Microsoft.ML.Data.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.DataView, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.DataView.1.4.0\lib\netstandard2.0\Microsoft.ML.DataView.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.FastTree, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.FastTree.1.4.0\lib\netstandard2.0\Microsoft.ML.FastTree.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.KMeansClustering, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.1.4.0\lib\netstandard2.0\Microsoft.ML.KMeansClustering.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.LightGbm, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.LightGbm.1.4.0\lib\netstandard2.0\Microsoft.ML.LightGbm.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.PCA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.1.4.0\lib\netstandard2.0\Microsoft.ML.PCA.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.StandardTrainers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.1.4.0\lib\netstandard2.0\Microsoft.ML.StandardTrainers.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ML.Transforms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ML.1.4.0\lib\netstandard2.0\Microsoft.ML.Transforms.dll</HintPath>
</Reference>
<Reference Include="MonoGame.Framework">
<HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.CodeDom, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.CodeDom.4.7.0\lib\net461\System.CodeDom.dll</HintPath>
</Reference>
<Reference Include="System.Collections.Immutable, Version=1.2.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.7.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Dataflow, Version=4.6.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Dataflow.4.11.0\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Content Include="Content\Crop.png" />
<Content Include="Content\house.png" />
<Content Include="Content\ProgressionBarStatus.png" />
<Content Include="Content\ProgressionBar.png" />
<Content Include="Content\Markers.png" />
<Content Include="Content\Mountain.png" />
<Content Include="Content\Planted.png" />
<Content Include="Content\Tile.png" />
<Content Include="Content\tileunplantable.png" />
<Content Include="Content\Tractor.png" />
<Content Include="Icon.ico" />
<None Include="Resources\TextFile1.txt" />
</ItemGroup>
<ItemGroup>
<MonoGameContentReference Include="Content\Content.mgcb" />
<None Include="app.config" />
<None Include="app.manifest" />
<None Include="packages.config" />
<None Include="Sources\ML\Data\Fertilizer Prediction.csv" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.ML.CpuMath.1.4.0\build\netstandard2.0\Microsoft.ML.CpuMath.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.CpuMath.1.4.0\build\netstandard2.0\Microsoft.ML.CpuMath.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.ML.FastTree.1.4.0\build\netstandard2.0\Microsoft.ML.FastTree.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.ML.FastTree.1.4.0\build\netstandard2.0\Microsoft.ML.FastTree.props'))" />
<Error Condition="!Exists('..\packages\LightGBM.2.3.1\build\LightGBM.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LightGBM.2.3.1\build\LightGBM.props'))" />
<Error Condition="!Exists('..\packages\LightGBM.2.3.1\build\LightGBM.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LightGBM.2.3.1\build\LightGBM.targets'))" />
</Target>
<Import Project="..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.targets" Condition="Exists('..\packages\Microsoft.ML.1.4.0\build\netstandard2.0\Microsoft.ML.targets')" />
<Import Project="..\packages\LightGBM.2.3.1\build\LightGBM.targets" Condition="Exists('..\packages\LightGBM.2.3.1\build\LightGBM.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,174 @@
<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt"><head><meta content="en-us" http-equiv="Content-Language" /><meta content="text/html; charset=utf-16" http-equiv="Content-Type" /><title _locID="NuGetUpgradeReportTitle">
NuGetMigrationLog
</title><style>
/* Body style, for the entire document */
body
{
background: #F3F3F4;
color: #1E1E1F;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
font-size: 12pt;
padding: 0;
margin: 0;
}
/* Header1 style, used for the main title */
h1
{
padding: 10px 0px 10px 10px;
font-size: 21pt;
background-color: #E2E2E2;
border-bottom: 1px #C1C1C2 solid;
color: #201F20;
margin: 0;
font-weight: normal;
}
/* Header2 style, used for "Overview" and other sections */
h2
{
font-size: 18pt;
font-weight: normal;
padding: 15px 0 5px 0;
margin: 0;
}
/* Header3 style, used for sub-sections, such as project name */
h3
{
font-weight: normal;
font-size: 15pt;
margin: 0;
padding: 15px 0 5px 0;
background-color: transparent;
}
.info-text
{
margin: 0px 0 0.75em 0;
}
/* Color all hyperlinks one color */
a
{
color: #1382CE;
}
/* Table styles */
table
{
border-spacing: 0 0;
border-collapse: collapse;
font-size: 11pt;
}
table th
{
background: #E7E7E8;
text-align: left;
text-decoration: none;
font-weight: normal;
padding: 3px 6px 3px 6px;
}
table td
{
vertical-align: top;
padding: 3px 6px 5px 5px;
margin: 0px;
border: 1px solid #E7E7E8;
background: #F7F7F8;
}
/* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */
.localLink
{
color: #1E1E1F;
background: #EEEEED;
text-decoration: none;
}
.localLink:hover
{
color: #1382CE;
background: #FFFF99;
text-decoration: none;
}
.issueCell
{
width: 100%;
}
.packageIssue
{
margin-left: 25px;
}
/* Padding around the content after the h1 */
#content
{
padding: 0px 20px 20px 20px;
}
.issues table
{
width: 97%;
}
/* All Icons */
.IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded
{
min-width:18px;
min-height:18px;
background-repeat:no-repeat;
background-position:center;
}
.IconSuccessEncoded
{
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABcElEQVR4Xq2TsUsCURzHv15g8ZJcBWlyiYYgCIWcb9DFRRwMW5TA2c0/QEFwFkxxUQdxVlBwCYWOi6IhWgQhBLHJUCkhLr/BW8S7gvrAg+N+v8/v+x68Z8MGy+XSCyABQAXgBgHGALoASkIIDWSLeLBetdHryMjd5IxQPWT4rn1c/P7+xxp72Cs9m5SZ0Bq2vPnbPFafK2zDvmNHypdC0BPkLlQhxJsCAhQoZwdZU5mwxh720qGo8MzTxTTKZDPCx2HoVzp6lz0Q9tKhyx0kGs8Ny+TkWRKk8lCROwEduhyg9l/6lunOPSfmH3NUH6uQ0KHLAe7JYvJjevm+DAMGJHToKtigE+vwvIidxLamb8IBY9e+C5LiXREkfho3TSd06HJA13/oh6T51MTsfQbHrsMynQ5dDihFjiK8JJAU9AKIWTp76dCVN7HWHrajmUEGvyF9nkbAE6gLIS7kTUyuf2gscLoJrElZo/Mvj+nPz/kLTmfnEwP3tB0AAAAASUVORK5CYII=);
}
.IconInfoEncoded
{
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);
}
.IconWarningEncoded
{
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);
}
.IconErrorEncoded
{
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);
}
</style></head><body><h1>
NuGet Migration Report - Game1</h1><div id="content"><h2 _locID="OverviewTitle">Overview</h2><div class="info-text">Migration to PackageReference was completed successfully. Please build and run your solution to verify that all packages are available.</div><div class="info-text">
If you run into any problems, have feedback, questions, or concerns, please
<a href="https://github.com/NuGet/Home/issues/">file an issue on the NuGet GitHub repository.</a></div><div class="info-text">
Changed files and this report have been backed up here:
<a href="C:\Users\Oskar\source\repos\PotatoPlanFinal\MigrationBackup\7a07b01e\Game1">C:\Users\Oskar\source\repos\PotatoPlanFinal\MigrationBackup\7a07b01e\Game1</a></div><div class="info-text"><a href="https://aka.ms/nuget-pc2pr-migrator-rollback">Help me rollback to packages.config</a></div><h2 _locID="PackagesTitle">Packages processed</h2><h3 _locID="IncludePackagesTitle">Top-level dependencies:</h3><div class="issues"><table><tr><th class="issueCell">Package Id</th><th>Version</th></tr><tr><td class="issueCell"><span>LightGBM</span></td><td><span>
v2.3.1</span></td></tr><tr><td class="issueCell"><span>Microsoft.ML</span></td><td><span>
v1.4.0</span></td></tr><tr><td class="issueCell"><span>Microsoft.ML.CpuMath</span></td><td><span>
v1.4.0</span></td></tr><tr><td class="issueCell"><span>Microsoft.ML.FastTree</span></td><td><span>
v1.4.0</span></td></tr><tr><td class="issueCell"><span>Microsoft.ML.LightGbm</span></td><td><span>
v1.4.0</span></td></tr><tr><td class="issueCell"><span>Newtonsoft.Json</span></td><td><span>
v12.0.3</span></td></tr><tr><td class="issueCell"><span>System.CodeDom</span></td><td><span>
v4.7.0</span></td></tr><tr><td class="issueCell"><span>System.Collections.Immutable</span></td><td><span>
v1.7.0</span></td></tr><tr><td class="issueCell"><span>System.Memory</span></td><td><span>
v4.5.4</span></td></tr><tr><td class="issueCell"><span>System.Reflection.Emit.Lightweight</span></td><td><span>
v4.7.0</span></td></tr><tr><td class="issueCell"><span>System.Runtime.CompilerServices.Unsafe</span></td><td><span>
v4.7.1</span></td></tr><tr><td class="issueCell"><span>System.Threading.Tasks.Dataflow</span></td><td><span>
v4.11.0</span></td></tr></table></div><p /><h3 _locID="IncludePackagesTitle">Transitive dependencies:</h3><div class="issues"><table><tr><th class="issueCell">Package Id</th><th>Version</th></tr><tr><td class="issueCell"><span>Microsoft.ML.DataView</span></td><td><span>
v1.4.0</span></td></tr><tr><td class="issueCell"><span>System.Buffers</span></td><td><span>
v4.5.1</span></td></tr><tr><td class="issueCell"><span>System.Numerics.Vectors</span></td><td><span>
v4.5.0</span></td></tr></table></div><h2 _locID="IssuesTitle">Package compatibility issues</h2><div class="issues"><table><tr><th /><th class="issueCell" _locID="DescriptionTableHeader">Description</th></tr><tr><td class="IconInfoEncoded" /><td class="issueCell">
No issues were found.
</td></tr></table></div></div></body></html>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="LightGBM" version="2.3.1" targetFramework="net461" />
<package id="Microsoft.ML" version="1.4.0" targetFramework="net461" />
<package id="Microsoft.ML.CpuMath" version="1.4.0" targetFramework="net461" />
<package id="Microsoft.ML.DataView" version="1.4.0" targetFramework="net461" />
<package id="Microsoft.ML.FastTree" version="1.4.0" targetFramework="net461" />
<package id="Microsoft.ML.LightGbm" version="1.4.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
<package id="System.Buffers" version="4.5.1" targetFramework="net461" />
<package id="System.CodeDom" version="4.7.0" targetFramework="net461" />
<package id="System.Collections.Immutable" version="1.7.0" targetFramework="net461" />
<package id="System.Memory" version="4.5.4" targetFramework="net461" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
<package id="System.Reflection.Emit.Lightweight" version="4.7.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.7.1" targetFramework="net461" />
<package id="System.Threading.Tasks.Dataflow" version="4.11.0" targetFramework="net461" />
</packages>