forked from s425077/PotatoPlan
rainfall noisemap
This commit is contained in:
parent
4a786a166e
commit
57a9076771
BIN
Game1/Content/Rainfall.png
Normal file
BIN
Game1/Content/Rainfall.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 MiB |
@ -326,7 +326,7 @@ namespace Game1
|
|||||||
{
|
{
|
||||||
for (int j = -1; j < input.getSize().Y + 1; j++)
|
for (int j = -1; j < input.getSize().Y + 1; j++)
|
||||||
{
|
{
|
||||||
spriteBatch.Draw(Rain, tractorUnit.getFarm().getRainPosition(input.getTileSize(), i, j), new Rectangle(0, cloudSprite * 96, input.getTileSize(), input.getTileSize()), Color.White);
|
spriteBatch.Draw(Rain, tractorUnit.getFarm().getRainPosition(input.getTileSize(), i, j), new Rectangle(0, cloudSprite * 96, input.getTileSize(), input.getTileSize()), tractorUnit.getFarm().getRainAmount(i, j));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ class Farm
|
|||||||
RainPosition.Y = r.Next(0, 1950);
|
RainPosition.Y = r.Next(0, 1950);
|
||||||
WindSpeed.X = r.Next(-1, 1);
|
WindSpeed.X = r.Next(-1, 1);
|
||||||
WindSpeed.Y = r.Next(-1, 1);
|
WindSpeed.Y = r.Next(-1, 1);
|
||||||
RainfallMap = PerlinNoise.LoadImage("C:\\Users\\Joel\\source\\repos\\Oskars Repo\\Game1\\Content\\Rainfall.bmp");
|
RainfallMap = PerlinNoise.LoadImage("C:/Users/Oskar/source/repos/PotatoPlanFinal/Game1/Content/Rainfall.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Rectangle getRainPosition(int TileSize, int x, int y)
|
public Rectangle getRainPosition(int TileSize, int x, int y)
|
||||||
|
@ -11,13 +11,20 @@ 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 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";
|
||||||
|
/*
|
||||||
private static string path = "C:/Users/Joel/source/repos/Oskars Repo/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/Joel/source/repos/Oskars Repo/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/Joel/source/repos/Oskars Repo/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/Joel/source/repos/Oskars Repo/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/Joel/source/repos/Oskars Repo/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/Joel/source/repos/Oskars Repo/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()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user