forked from s425077/PotatoPlan
Strange results
This commit is contained in:
parent
aee7262c45
commit
e2f903eb8c
@ -69,7 +69,7 @@ namespace Game1
|
|||||||
|
|
||||||
//Generates the map with some random values
|
//Generates the map with some random values
|
||||||
inventory.initInventorySystem();
|
inventory.initInventorySystem();
|
||||||
input.init(graphics, new Vector2(16,16), 56, 1); //Generates the starting size
|
input.init(graphics, new Vector2(16,16), 56, 10); //Generates the starting size
|
||||||
houseUnit.init(input.getTileSize(), input.getSpacing()); //Generates the house position
|
houseUnit.init(input.getTileSize(), input.getSpacing()); //Generates the house position
|
||||||
tractorUnit.init(houseUnit.GetRectangle(), input); //Generates the Tractor
|
tractorUnit.init(houseUnit.GetRectangle(), input); //Generates the Tractor
|
||||||
tractorUnit.updateSizing(input, 0, houseUnit.getVector(), Time); //Updates the first Size of the Tractor
|
tractorUnit.updateSizing(input, 0, houseUnit.getVector(), Time); //Updates the first Size of the Tractor
|
||||||
|
@ -11,12 +11,12 @@ using Microsoft.ML.Trainers.LightGbm;
|
|||||||
class MLModel
|
class MLModel
|
||||||
{
|
{
|
||||||
private static MLContext mlContext = new MLContext(seed: 1);
|
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 path = "C:/Users/Joel/source/repos/Oskars Repo/Game1/Content/ML/Fertilizer_Prediction.csv";
|
||||||
private static string modelpath = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/MLmodel";
|
private static string modelpath = "C:/Users/Joel/source/repos/Oskars Repo/Game1/Content/ML/MLmodel";
|
||||||
private static string report = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/report";
|
private static string report = "C:/Users/Joel/source/repos/Oskars Repo/Game1/Content/ML/report";
|
||||||
private static string pathBig = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/BigFertPredict.csv";
|
private static string pathBig = "C:/Users/Joel/source/repos/Oskars Repo/Game1/Content/ML/BigFertPredict.csv";
|
||||||
private static string modelpathBig = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/MLmodelBig";
|
private static string modelpathBig = "C:/Users/Joel/source/repos/Oskars Repo/Game1/Content/ML/MLmodelBig";
|
||||||
private static string reportBig = "C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/ML/report_BigModel";
|
private static string reportBig = "C:/Users/Joel/source/repos/Oskars Repo/Game1/Content/ML/report_BigModel";
|
||||||
|
|
||||||
// Loading data, creatin and saving ML model for smaller dataset (100)
|
// Loading data, creatin and saving ML model for smaller dataset (100)
|
||||||
public static void CreateModel()
|
public static void CreateModel()
|
||||||
|
@ -9,7 +9,9 @@ class Tractor
|
|||||||
private Path path = new Path();
|
private Path path = new Path();
|
||||||
private SmartTractor smartTractor = new SmartTractor();
|
private SmartTractor smartTractor = new SmartTractor();
|
||||||
private HandleRotation handleRotation = new HandleRotation();
|
private HandleRotation handleRotation = new HandleRotation();
|
||||||
private int j = 60;
|
private int WaitFrame = 30;
|
||||||
|
private int j;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void updateSizing(Input input, int Status, Vector2 newHousePos, DayNightCycle Time)
|
public void updateSizing(Input input, int Status, Vector2 newHousePos, DayNightCycle Time)
|
||||||
@ -63,10 +65,29 @@ class Tractor
|
|||||||
|
|
||||||
public void updatePosition(Vector2 Size, int Status) // updates the position
|
public void updatePosition(Vector2 Size, int Status) // updates the position
|
||||||
{
|
{
|
||||||
|
|
||||||
//farm.updateSize(Size, sizeTile, Spacing);
|
//farm.updateSize(Size, sizeTile, Spacing);
|
||||||
for (int i = 0; i < Speed; i++)
|
for (int i = 0; i < Speed; i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
updateDirection(Size, Position);
|
updateDirection(Size, Position);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (!smartTractor.getWaitTwoFrames())
|
||||||
|
{
|
||||||
|
updateDirection(Size, Position);
|
||||||
|
j = WaitFrame;
|
||||||
|
}
|
||||||
|
else if (j != 0)
|
||||||
|
{
|
||||||
|
j--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
smartTractor.setWaitTwoFrames(false);
|
||||||
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user