Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5dce3ed955 | ||
|
efd90e9b32 | ||
|
32251898bb | ||
|
c854bf093b | ||
|
8ba385b759 | ||
|
7809c46bdc | ||
|
ccf064ca06 | ||
|
d9ff997ea3 | ||
|
4ea129f803 | ||
|
a46956cbd0 | ||
|
28f5031ba8 | ||
740730958b | |||
a25e05cc3c |
1600
Game1/Content/ML/BigFertPredict.csv
Normal file
1600
Game1/Content/ML/BigFertPredict.csv
Normal file
File diff suppressed because it is too large
Load Diff
100
Game1/Content/ML/Fertilizer_Prediction.csv
Normal file
100
Game1/Content/ML/Fertilizer_Prediction.csv
Normal 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
|
|
BIN
Game1/Content/ML/MLmodel
Normal file
BIN
Game1/Content/ML/MLmodel
Normal file
Binary file not shown.
BIN
Game1/Content/ML/MLmodelBig
Normal file
BIN
Game1/Content/ML/MLmodelBig
Normal file
Binary file not shown.
3
Game1/Content/ML/report
Normal file
3
Game1/Content/ML/report
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Micro Accuracy: 0.95829
|
||||||
|
LogLoss Average: 0.100171
|
||||||
|
LogLoss Reduction: 0.933795
|
3
Game1/Content/ML/report_BigModel
Normal file
3
Game1/Content/ML/report_BigModel
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Micro Accuracy: 1
|
||||||
|
LogLoss Average: 0.002345
|
||||||
|
LogLoss Reduction: 0.998302
|
BIN
Game1/Content/MLmodel
Normal file
BIN
Game1/Content/MLmodel
Normal file
Binary file not shown.
@ -90,6 +90,16 @@
|
|||||||
<Compile Include="Sources\Crops\SoilProperties.cs" />
|
<Compile Include="Sources\Crops\SoilProperties.cs" />
|
||||||
<Compile Include="Sources\Objects\DayNightCycle.cs" />
|
<Compile Include="Sources\Objects\DayNightCycle.cs" />
|
||||||
<Compile Include="Sources\Objects\HandleRotation.cs" />
|
<Compile Include="Sources\Objects\HandleRotation.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" />
|
||||||
@ -131,11 +141,58 @@
|
|||||||
<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="Sources\ML\Data\Fertilizer Prediction.csv" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="C5">
|
<PackageReference Include="C5">
|
||||||
|
84
Game1/Properties/Resources.Designer.cs
generated
Normal file
84
Game1/Properties/Resources.Designer.cs
generated
Normal 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]";.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Fertilizer_Prediction {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Fertilizer_Prediction", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
124
Game1/Properties/Resources.resx
Normal file
124
Game1/Properties/Resources.resx
Normal 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>
|
0
Game1/Resources/TextFile1.txt
Normal file
0
Game1/Resources/TextFile1.txt
Normal file
@ -17,7 +17,7 @@ class Controller
|
|||||||
public Vector2 updateWindow(int tileSize, int Spacing, Vector2 Size)
|
public Vector2 updateWindow(int tileSize, int Spacing, Vector2 Size)
|
||||||
{
|
{
|
||||||
KeyboardState state = Keyboard.GetState();
|
KeyboardState state = Keyboard.GetState();
|
||||||
if (state.IsKeyDown(Keys.D) && Size.X < 100)
|
if (state.IsKeyDown(Keys.D) && Size.X < 99)
|
||||||
{
|
{
|
||||||
Size.X++;
|
Size.X++;
|
||||||
graphics.PreferredBackBufferWidth = (tileSize + Spacing) * (int)Size.X - Spacing;
|
graphics.PreferredBackBufferWidth = (tileSize + Spacing) * (int)Size.X - Spacing;
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.Xna.Framework;
|
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
|
||||||
|
|
||||||
class Crops
|
|
||||||
{
|
|
||||||
public int Status;
|
|
||||||
private int Timer;
|
|
||||||
private Random r;
|
|
||||||
public int x;
|
|
||||||
public int y;
|
|
||||||
|
|
||||||
public void updateCrop()
|
|
||||||
{
|
|
||||||
if (Status != 0)
|
|
||||||
{
|
|
||||||
Timer--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getCropTimer()
|
|
||||||
{
|
|
||||||
return Timer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getStatus()
|
|
||||||
{
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(int newStatus)
|
|
||||||
{
|
|
||||||
Status = newStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPosition(int newx, int newy)
|
|
||||||
{
|
|
||||||
x = newx;
|
|
||||||
y = newy;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,91 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.Xna.Framework;
|
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
|
||||||
|
|
||||||
class Farm
|
|
||||||
{
|
|
||||||
private Crops[,] crops;
|
|
||||||
private Random r;
|
|
||||||
|
|
||||||
public void init(Vector2 Size)
|
|
||||||
{
|
|
||||||
r = new Random();
|
|
||||||
crops = new Crops[100, (GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height / 56) - 125 / 56];
|
|
||||||
for (int i = 0; i < Size.X; i++)
|
|
||||||
{
|
|
||||||
for (int j = 0; j < Size.Y; j++)
|
|
||||||
{
|
|
||||||
int x = r.Next(0, 2);
|
|
||||||
crops[i, j] = new Crops();
|
|
||||||
crops[i, j].Status = x;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateFarm(Vector2 Size)
|
|
||||||
{
|
|
||||||
for (int i = 0; i > Size.X; i++)
|
|
||||||
{
|
|
||||||
for (int j = 0; j > Size.Y; j++)
|
|
||||||
{
|
|
||||||
crops[i, j].updateCrop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCropStatus(float xfloat, float yfloat, int Spacing)
|
|
||||||
{
|
|
||||||
int x = (int)xfloat / Spacing;
|
|
||||||
int y = (int)yfloat / Spacing;
|
|
||||||
if (crops[x, y].Status == 3)
|
|
||||||
{
|
|
||||||
crops[x, y].Status = 1;
|
|
||||||
}
|
|
||||||
else if(crops[x, y].Status == 0)
|
|
||||||
{
|
|
||||||
//do nothing
|
|
||||||
}
|
|
||||||
else if (crops[x, y].Status == 1)
|
|
||||||
{
|
|
||||||
crops[x, y].Status = 2;
|
|
||||||
}
|
|
||||||
else if (crops[x, y].Status == 2)
|
|
||||||
{
|
|
||||||
crops[x, y].Status = 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Crops getCrop(int x, int y)
|
|
||||||
{
|
|
||||||
return crops[x,y];
|
|
||||||
}
|
|
||||||
|
|
||||||
public Crops[,] getCrops()
|
|
||||||
{
|
|
||||||
return crops;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateSize(Vector2 Size, int tileSize, int Spacing)
|
|
||||||
{
|
|
||||||
|
|
||||||
for (int i = 0; i < (int)Size.X; i++)
|
|
||||||
{
|
|
||||||
for (int j = 0; j < (int)Size.Y; j++)
|
|
||||||
{
|
|
||||||
crops[i, j].x = (tileSize + Spacing) * i;
|
|
||||||
crops[i, j].y = (tileSize + Spacing) * j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string getSize()
|
|
||||||
{
|
|
||||||
return crops[1, 1].x.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.Xna.Framework;
|
|
||||||
|
|
||||||
class House
|
|
||||||
{
|
|
||||||
|
|
||||||
private Rectangle housePos;
|
|
||||||
private Vector2 pos;
|
|
||||||
private Random r = new Random();
|
|
||||||
|
|
||||||
public void init(int tileSize, int Spacing)
|
|
||||||
{
|
|
||||||
int x = r.Next(0, 8);
|
|
||||||
int y = r.Next(0, 8);
|
|
||||||
|
|
||||||
pos = new Vector2(x, y);
|
|
||||||
housePos = new Rectangle((x * tileSize + Spacing), y * (tileSize + Spacing), tileSize, tileSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateRectangle(Vector2 Size, int tileSize)
|
|
||||||
{
|
|
||||||
if (pos.X + 1 > Size.X)
|
|
||||||
{
|
|
||||||
pos = new Vector2(pos.X - 1, pos.Y);
|
|
||||||
}
|
|
||||||
if (pos.Y + 1 > Size.Y)
|
|
||||||
{
|
|
||||||
pos = new Vector2(pos.X, pos.Y - 1);
|
|
||||||
}
|
|
||||||
housePos = new Rectangle((int)pos.X * (tileSize + 1), (int)pos.Y * (tileSize + 1), tileSize, tileSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Rectangle GetRectangle()
|
|
||||||
{
|
|
||||||
return housePos;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Vector2 getVector()
|
|
||||||
{
|
|
||||||
return new Vector2(housePos.X, housePos.Y);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,100 +0,0 @@
|
|||||||
using Microsoft.Xna.Framework;
|
|
||||||
using Microsoft.Xna.Framework.Input;
|
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Input
|
|
||||||
{
|
|
||||||
private KeyboardState state = Keyboard.GetState();
|
|
||||||
private GraphicsDeviceManager graphics;
|
|
||||||
private Vector2 Size;
|
|
||||||
private int tileSize;
|
|
||||||
private int Spacing;
|
|
||||||
|
|
||||||
public void init(GraphicsDeviceManager Graphics, Vector2 size, int TileSize, int SPacing)
|
|
||||||
{
|
|
||||||
graphics = Graphics;
|
|
||||||
tileSize = TileSize;
|
|
||||||
Spacing = SPacing;
|
|
||||||
Size = size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int changeSpeed(int speed)
|
|
||||||
{
|
|
||||||
KeyboardState state = Keyboard.GetState();
|
|
||||||
if (state.IsKeyDown(Keys.Right))
|
|
||||||
{
|
|
||||||
speed++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state.IsKeyDown(Keys.Left) && speed > 0)
|
|
||||||
{
|
|
||||||
speed--;
|
|
||||||
}
|
|
||||||
return speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Vector2 changeSize()
|
|
||||||
{
|
|
||||||
KeyboardState state = Keyboard.GetState();
|
|
||||||
if (state.IsKeyDown(Keys.D) && Size.X < 100)
|
|
||||||
{
|
|
||||||
Size.X++;
|
|
||||||
graphics.PreferredBackBufferWidth = (tileSize + Spacing) * (int)Size.X - Spacing;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state.IsKeyDown(Keys.A) && Size.X > 2)
|
|
||||||
{
|
|
||||||
Size.X--;
|
|
||||||
graphics.PreferredBackBufferWidth = (tileSize + Spacing) * (int)Size.X - Spacing;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state.IsKeyDown(Keys.W) && Size.Y < (GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height / tileSize) - 125 / tileSize)
|
|
||||||
{
|
|
||||||
Size.Y++;
|
|
||||||
graphics.PreferredBackBufferHeight = (tileSize + Spacing) * (int)Size.Y - Spacing + 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state.IsKeyDown(Keys.S) && Size.Y > 2)
|
|
||||||
{
|
|
||||||
Size.Y--;
|
|
||||||
graphics.PreferredBackBufferHeight = (tileSize + Spacing) * (int)Size.Y - Spacing + 100;
|
|
||||||
}
|
|
||||||
return Size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void controlWindowSize()
|
|
||||||
{
|
|
||||||
if (Size.X * tileSize + 5 > GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width)
|
|
||||||
{
|
|
||||||
tileSize--;
|
|
||||||
}
|
|
||||||
if (Size.X * tileSize - 5 < GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width && tileSize < 56)
|
|
||||||
{
|
|
||||||
tileSize++;
|
|
||||||
}
|
|
||||||
changeSize();
|
|
||||||
graphics.ApplyChanges();
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getTileSize()
|
|
||||||
{
|
|
||||||
return tileSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSpacing()
|
|
||||||
{
|
|
||||||
return Spacing;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Vector2 getSize()
|
|
||||||
{
|
|
||||||
return Size;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTileSize(int newTileSize)
|
|
||||||
{
|
|
||||||
tileSize = newTileSize;
|
|
||||||
}
|
|
||||||
}
|
|
1600
Game1/Sources/ML/Data/FertPredictDataset.csv
Normal file
1600
Game1/Sources/ML/Data/FertPredictDataset.csv
Normal file
File diff suppressed because it is too large
Load Diff
100
Game1/Sources/ML/Data/Fertilizer Prediction.csv
Normal file
100
Game1/Sources/ML/Data/Fertilizer Prediction.csv
Normal 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
|
|
43
Game1/Sources/ML/InOut/BigModelInput.cs
Normal file
43
Game1/Sources/ML/InOut/BigModelInput.cs
Normal 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; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
15
Game1/Sources/ML/InOut/BigModelOutput.cs
Normal file
15
Game1/Sources/ML/InOut/BigModelOutput.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
40
Game1/Sources/ML/InOut/ModelInput.cs
Normal file
40
Game1/Sources/ML/InOut/ModelInput.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
17
Game1/Sources/ML/InOut/ModelOutput.cs
Normal file
17
Game1/Sources/ML/InOut/ModelOutput.cs
Normal 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; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
169
Game1/Sources/ML/MLModel.cs
Normal file
169
Game1/Sources/ML/MLModel.cs
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.ML;
|
||||||
|
using Microsoft.ML.Data;
|
||||||
|
using Microsoft.ML.Trainers.LightGbm;
|
||||||
|
|
||||||
|
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";
|
||||||
|
|
||||||
|
// Loading data, creatin and saving ML model for smaller dataset (100)
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ... for bigger dataset (1600)
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Building and training ML model, very small dataset (100 entries)
|
||||||
|
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);
|
||||||
|
|
||||||
|
return MLModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Building and training ML model, moderate size dataset (1600 entries)
|
||||||
|
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);
|
||||||
|
|
||||||
|
return MLModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ITransformer TrainModel(MLContext mlContext, IDataView trainingDataView, IEstimator<ITransformer> trainingPipeline)
|
||||||
|
{
|
||||||
|
ITransformer model = trainingPipeline.Fit(trainingDataView);
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Evaluate and save results to a text file
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Microsoft.ML.PredictionEngine<ModelInput, ModelOutput> CreateEngine()
|
||||||
|
{
|
||||||
|
ITransformer mlModel = LoadModel(false);
|
||||||
|
return mlContext.Model.CreatePredictionEngine<ModelInput, ModelOutput>(mlModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Game1.Sources
|
|
||||||
{
|
|
||||||
class Queue
|
|
||||||
{
|
|
||||||
private Task[] task;
|
|
||||||
|
|
||||||
public void Sort()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.Xna.Framework;
|
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
|
||||||
using Microsoft.Xna.Framework.Input;
|
|
||||||
|
|
||||||
namespace Game1.Sources
|
|
||||||
{
|
|
||||||
class Task
|
|
||||||
{
|
|
||||||
private Vector2 Position;
|
|
||||||
private int Objective;
|
|
||||||
private float timer;
|
|
||||||
|
|
||||||
public void setTimer(float newTimer)
|
|
||||||
{
|
|
||||||
timer = newTimer;
|
|
||||||
}
|
|
||||||
public void updateTimer()
|
|
||||||
{
|
|
||||||
timer = timer - 1 / 60;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,220 +0,0 @@
|
|||||||
using Microsoft.Xna.Framework;
|
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
|
||||||
using Microsoft.Xna.Framework.Input;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
|
|
||||||
class Tractor
|
|
||||||
{
|
|
||||||
static private Vector2 Position;
|
|
||||||
private Vector2 TargetPosition;
|
|
||||||
private Vector2 Direction;
|
|
||||||
private int Spacing, sizeTile;
|
|
||||||
private int Speed = 1;
|
|
||||||
private Vector2 Size;
|
|
||||||
private Random r = new Random();
|
|
||||||
private Farm farm = new Farm();
|
|
||||||
private Vector2 housePos;
|
|
||||||
private String currentTask;
|
|
||||||
private SmartTractor smartTractor = new SmartTractor();
|
|
||||||
private int Score;
|
|
||||||
private int previousTask;
|
|
||||||
|
|
||||||
public void updateSizing(Input input, int Status, Vector2 newHousePos)
|
|
||||||
{
|
|
||||||
Spacing = input.getSpacing();
|
|
||||||
sizeTile = input.getTileSize();
|
|
||||||
Size = input.getSize();
|
|
||||||
updatePosition(input.getSize(), Status);
|
|
||||||
housePos = newHousePos;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void init(Rectangle house)
|
|
||||||
{
|
|
||||||
sizeTile = 56;
|
|
||||||
Spacing = 1;
|
|
||||||
farm.init(new Vector2(100, (GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height / sizeTile) - 125 / sizeTile));
|
|
||||||
Position = housePos;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int updateDirection(Vector2 Size, Vector2 newPosition) /// Runs when the tractor reaches a tile
|
|
||||||
{
|
|
||||||
Vector2 DeltaPosition = TargetPosition - Position;
|
|
||||||
if (DeltaPosition.X == 0)
|
|
||||||
{
|
|
||||||
if (DeltaPosition.Y == 0)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (housePos != Position)
|
|
||||||
{
|
|
||||||
int x = (int)Position.X / (sizeTile + Spacing);
|
|
||||||
int y = (int)Position.Y / (sizeTile + Spacing);
|
|
||||||
currentTask = currentTaskDecider(farm.getCrop(x, y).Status, 0);
|
|
||||||
farm.setCropStatus(x, y, Spacing);
|
|
||||||
setTargetPosition(housePos); //Returns to the farm
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setTargetPosition(smartTractor.returnChoice()); //Sets a random Target
|
|
||||||
int xTarget = (int)TargetPosition.X / (sizeTile + Spacing);
|
|
||||||
int yTarget = (int)TargetPosition.Y / (sizeTile + Spacing);
|
|
||||||
currentTask = currentTaskDecider(farm.getCrop(xTarget, yTarget).Status, 1);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else if (DeltaPosition.Y > 0)
|
|
||||||
{
|
|
||||||
Direction = new Vector2(0, 1);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else if (DeltaPosition.Y < 0)
|
|
||||||
{
|
|
||||||
Direction = new Vector2(0, -1);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else if (DeltaPosition.X > 0)
|
|
||||||
{
|
|
||||||
Direction = new Vector2(1, 0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else if (DeltaPosition.X < 0)
|
|
||||||
{
|
|
||||||
Direction = new Vector2(-1, 0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updatePosition(Vector2 Size, int Status) /// updates the position
|
|
||||||
{
|
|
||||||
|
|
||||||
farm.updateSize(Size, sizeTile, Spacing);
|
|
||||||
for (int i = 0; i < Speed; i++) //Where all the choices the tractor does comes from
|
|
||||||
{
|
|
||||||
smartTractor.updateMap(Position, housePos, farm.getCrops(), Size, sizeTile, Spacing, Score);
|
|
||||||
Position = Position + Direction;
|
|
||||||
updateDirection(Size, Position);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Vector2 getPos()
|
|
||||||
{
|
|
||||||
return Position;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void increaseSpeed()
|
|
||||||
{
|
|
||||||
Speed++;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void decreaseSpeed()
|
|
||||||
{
|
|
||||||
if (Speed > 0)
|
|
||||||
{
|
|
||||||
Speed--;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setTargetPosition(Vector2 newPosition) /// sets the TargetPosition once it reaches its destination
|
|
||||||
{
|
|
||||||
TargetPosition = newPosition;
|
|
||||||
}
|
|
||||||
public void setSpeed(int newSpeed)
|
|
||||||
{
|
|
||||||
Speed = newSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSpeed()
|
|
||||||
{
|
|
||||||
return Speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPos(Vector2 newPos)
|
|
||||||
{
|
|
||||||
Position = newPos;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Farm getFarm()
|
|
||||||
{
|
|
||||||
return farm;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Vector2 getTargetPosition()
|
|
||||||
{
|
|
||||||
return TargetPosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCurrentTask()
|
|
||||||
{
|
|
||||||
return currentTask;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getScore()
|
|
||||||
{
|
|
||||||
return Score;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String currentTaskDecider(int Status, int Stage)
|
|
||||||
{
|
|
||||||
previousTask = Status;
|
|
||||||
if (previousTask == 3 && Stage != 1)
|
|
||||||
{
|
|
||||||
Score++;
|
|
||||||
}
|
|
||||||
if (Stage == 0)
|
|
||||||
{
|
|
||||||
if (Status == 0)
|
|
||||||
{
|
|
||||||
return "Returning with nothing after going out for a stroll";
|
|
||||||
}
|
|
||||||
else if (Status == 1)
|
|
||||||
{
|
|
||||||
return "Returning with nothing after planting seeds";
|
|
||||||
}
|
|
||||||
else if (Status == 2)
|
|
||||||
{
|
|
||||||
return "Returning with nothing after adding fertilizer";
|
|
||||||
}
|
|
||||||
else if (Status == 3)
|
|
||||||
{
|
|
||||||
return "Returning with Crops";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (Status == 0)
|
|
||||||
{
|
|
||||||
return "Going for a stroll";
|
|
||||||
}
|
|
||||||
else if (Status == 1)
|
|
||||||
{
|
|
||||||
return "Planting seeds";
|
|
||||||
}
|
|
||||||
else if (Status == 2)
|
|
||||||
{
|
|
||||||
return "Adding fertilizer";
|
|
||||||
}
|
|
||||||
else if (Status == 3)
|
|
||||||
{
|
|
||||||
return "Going for Crops";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.Xna.Framework;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
class SmartTractor
|
|
||||||
{
|
|
||||||
private Crops[,] crops;
|
|
||||||
private Vector2 housePos;
|
|
||||||
private Vector2 tractorPos;
|
|
||||||
private Vector2 Size;
|
|
||||||
private int tileSize;
|
|
||||||
private int Score;
|
|
||||||
private int Spacing;
|
|
||||||
private Random r = new Random();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Vector2 returnChoice()
|
|
||||||
{
|
|
||||||
return new Vector2(r.Next(0, (int)Size.X), r.Next(0, (int)Size.Y)) * (tileSize + Spacing);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void updateMap(Vector2 newTractorPos, Vector2 newHousePos, Crops[,] newCropsStatus, Vector2 newSize, int newTileSize, int newSpacing, int newScore)
|
|
||||||
{
|
|
||||||
crops = newCropsStatus;
|
|
||||||
housePos = newHousePos;
|
|
||||||
tractorPos = newTractorPos;
|
|
||||||
Size = newSize;
|
|
||||||
tileSize = newTileSize;
|
|
||||||
Spacing = newSpacing;
|
|
||||||
Score = newScore;
|
|
||||||
}
|
|
||||||
}
|
|
@ -7,14 +7,14 @@
|
|||||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
|
||||||
</dependentAssembly>
|
</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>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||||
</dependentAssembly>
|
</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>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Threading.Tasks.Dataflow" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<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" />
|
<bindingRedirect oldVersion="0.0.0.0-4.6.5.0" newVersion="4.6.5.0" />
|
||||||
|
210
MigrationBackup/7a07b01e/Game1/Game1.csproj
Normal file
210
MigrationBackup/7a07b01e/Game1/Game1.csproj
Normal 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>
|
174
MigrationBackup/7a07b01e/Game1/NuGetUpgradeLog.html
Normal file
174
MigrationBackup/7a07b01e/Game1/NuGetUpgradeLog.html
Normal 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>
|
18
MigrationBackup/7a07b01e/Game1/packages.config
Normal file
18
MigrationBackup/7a07b01e/Game1/packages.config
Normal 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>
|
Loading…
Reference in New Issue
Block a user