Commit 899b9fb0 by Michael Keller

parent c319ffcb
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
 ... ... @@ -12,19 +12,35 @@ from project import Birkhoff, Polytope # dist = [1,1,1,1,1,1,1,1,1] # larger example # x = 15 # y = 15 # R = lambda a, b: [[-1, 0, 0.5, -0.5, 1, 0, 0.5, 1, 0.5, 0], # [0, -1, 0, 1, 0, 0, 0.5, 0.5, 0.5, 0], # [0.5, 0, -1, 0, 0, 0, 0.5, 0.5, 0, -0.5], # [-0.5, 1, 0, -1, 0, 0, -1, 0.5, 0.5, 0.5], # [0, 0, 0, 0, -1, 0, 0, 0, 0, 0], # [0, 0, 0, 0, 0, -1, 1, 0.5, 0, 0], # [0.5, 0.5, 0.5, -0.5, 0, 0.5, -1, 0.5, 0.5, 0.5], # [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], # [0.5, 0.5, 0, 1, 0, 0, 0.5, 0.5, -1, 0], # [0, 0, -0.5, 0.5, 0, 0, 1, 0.5, 0.5, -1]][a][b] # dist = [23, 23, 23, 23, 23, 22, 22, 22, 22, 22] # Cotrini from Thesis x = 15 y = 15 R = lambda a, b: [[-1, 0, 0.5, -0.5, 1, 0, 0.5, 1, 0.5, 0], [0, -1, 0, 1, 0, 0, 0.5, 0.5, 0.5, 0], [0.5, 0, -1, 0, 0, 0, 0.5, 0.5, 0, -0.5], [-0.5, 1, 0, -1, 0, 0, -1, 0.5, 0.5, 0.5], [0, 0, 0, 0, -1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, -1, 1, 0.5, 0, 0], [0.5, 0.5, 0.5, -0.5, 0, 0.5, -1, 0.5, 0.5, 0.5], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0.5, 0.5, 0, 1, 0, 0, 0.5, 0.5, -1, 0], [0, 0, -0.5, 0.5, 0, 0, 1, 0.5, 0.5, -1]][a][b] dist = [23, 23, 23, 23, 23, 22, 22, 22, 22, 22] R = lambda a, b: [[-0.5,1,1,1,1,1,0.5,-1,0.5,0.5,1], [1 , -0.5 , -1 , 1 , 1 , 0.5 , 0.5 , -1 , 1 , 1 , 1], [1 , -1 , -0.5 , -1 , 1 , 0 , 0.5 , 0.5 , 0 , 0 , 0], [1 , 1 , -1 , -0.5 , 0 , 0 , 0.5 , -1 , 1 , -1 , 0], [1 , 1 , 1 , 0 , -0.5 , 0 , 0.5 , 1 , 1 , 1 , 1], [1 , 0.5 , 0 , 0 , 0 , -0.5 , 0.5 , 0 , 0 , 0 , 0], [0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5 , 0.5], [-1 , -1 , 0.5 , -1 , 1 , 0 , 0.5 , -0.5 , 0 , 0.5 , 0], [0.5 , 1 , 0 , 1 , 1 , 0 , 0.5 , 0 , -0.5 , 1 , 0], [0.5 , 1 , 0 , -1 , 1 , 0 , 0.5 , 0.5 , 1 , -0.5 , 1], [1 , 1 , 0 , 0 , 1 , 0 , 0.5 , 0 , 0 , 1 , -0.5]][a][b] dist = [20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21] # auto calculate some vars numb_crops = len(dist) ... ... @@ -205,7 +221,7 @@ def main(): if iterations % 100 == 0: if iterations % 1 == 0: print("Score: ", score(x0), "Gradient Sum: ", sum(gradient(x0))) # print(x0) ... ... @@ -213,10 +229,10 @@ def main(): best_x0 = copy.deepcopy(x0) best_x0_score = score(x0) print("Write to file") f = open("best-score.txt", "a") f.write("Score: " + str(best_x0_score) + "\n x0 = " + str(best_x0) + "\n\n") f.close() # print("Write to file") # f = open("best-score.txt", "a") # f.write("Score: " + str(best_x0_score) + "\n x0 = " + str(best_x0) + "\n\n") # f.close() print("Terminated") print("Score: ", score(x0)) ... ...
 ... ... @@ -2,7 +2,7 @@ \section{Agroscope Data} The first matrix is: The first matrix obtained from \cite{agroscope-matrix} is: \FloatBarrier \begin{figure}[h] \centering ... ... @@ -41,7 +41,7 @@ where \end{figure} \FloatBarrier and the second matrix is: and the second matrix obtained from \cite{cotrini-matrix} is: \FloatBarrier \begin{figure}[h] \centering ... ...
 ... ... @@ -38,7 +38,7 @@ we tackle these issues. Again the Birkhoff Polytope offers a solution. There are methods for finding points within the Birkhoff Polytope that have a minimal Euclidian distance to any arbitrary point TODO: Cite. Euclidian distance to any arbitrary point \cite{https://doi.org/10.48550/arxiv.1910.11369}. Hence if we could represent all valid fractional solutions within a Birkhoff Polytope we could use these methods. ... ... @@ -110,10 +110,11 @@ Which yields the following scores: \centering \begin{tabular}{@{}cccc@{}} \toprule Dataset & Best known bound & Arnold score & Gradient Ascent\\ \midrule 1 & $950$ & $635$ & TODO\\ 2 & $1624$ & TODO & TODO\\ 1 & $950$ & $635$ & $582$\\ 2 & $1624$ & TODO & $1129$\\ \bottomrule \end{tabular} \end{figure} \FloatBarrier TODO \ No newline at end of file that are not competitive with other results. \ No newline at end of file
 ... ... @@ -8,7 +8,7 @@ across their field. However, there are environmental impacts to consider. Planting only a single crop type in a field often makes the use of pesticides necessary and results in low land-use efficiency. low land-use efficiency \cite{agroscope-slides}. An alternative approach currently being explored is the planting of many different types of crops within ... ... @@ -19,10 +19,12 @@ and pesticides provide in traditional fields. The idea is to split up a large field into many smaller squares, so called pixels. Then neighboring pixels might benefit from each other. This approach is called pixel farming. other. This approach is called pixel farming \cite{Ditzler2022, agroscope-slides}. For this purpose, data on crop relationships have been compiled. We can assume we are given have been compiled \cite{agroscope-matrix, cotrini-matrix}. We can assume we are given a function that tells us how beneficial it would be to plant two types of crops next to each other, represented as a numerical value ranging from $-1$ ... ...
 ... ... @@ -252,7 +252,7 @@ following solutions for our benchmark problems: \begin{tabular}{@{}cccc@{}} \toprule Dataset & Best known bound & Arnold score & LP Method\\ \midrule 1 & $950$ & $635$ & $658$\\ 2 & $1624$ & TODO & TODO\\ 2 & $1624$ & TODO & $1181$\\ \bottomrule \end{tabular} \end{figure} ... ...
 ... ... @@ -3,7 +3,7 @@ There are still two main open problems that we have not been able to resolve. The first question is wether there exists an algorithm is wether an algorithm exists that can generate an entirely integer solution of equal quality to a given fractional solution. In this thesis we were only able to show ... ...
 @book{bringhurst1996ets, title={{The Elements of Typographic Style}}, author={Bringhurst, Robert}, year={1996}, publisher={Hartley \& Marks} } @book{alma990005774300205503, title = {COMPUTERS AND INTRACTABILITY A Guide to the Theory of NP-Completeness}, author = {Michael R. Garey, David S. Johnson}, ... ... @@ -11,3 +5,59 @@ year = {1979}, publisher = {Bell Telephone Laboratories, Incorporated}, } @misc{https://doi.org/10.48550/arxiv.1910.11369, doi = {10.48550/ARXIV.1910.11369}, url = {https://arxiv.org/abs/1910.11369}, author = {Blondel, Mathieu}, keywords = {Machine Learning (stat.ML), Machine Learning (cs.LG), FOS: Computer and information sciences, FOS: Computer and information sciences}, title = {Structured Prediction with Projection Oracles}, publisher = {arXiv}, year = {2019}, copyright = {arXiv.org perpetual, non-exclusive license} } @misc{arnold-paper, author = "Arnold, Daniel", title = "Zur optimalen Anordnung von Pflanzen in Mischkulturen", year = {2022}, month = {February}, howpublished = "personal communication" } @misc{agroscope-slides, author = "Helfenstein, Julian", title = "Living Lab Honesta Slides", year = {2022}, month = {February}, howpublished = "personal communication" } @misc{cotrini-matrix, author = "Cotrini, Carlos", title = "Relationship Matrix 2 from Agroscope", year = {2022}, month = {January}, howpublished = "personal communication" } @misc{agroscope-matrix, author = "Cotrini, Carlos", title = "Relationship Matrix 1 from Agroscope", year = {2022}, month = {January}, howpublished = "personal communication" } ﻿@Article{Ditzler2022, author={Ditzler, Lenora and Driessen, Clemens}, title={Automating Agroecology: How to Design a Farming Robot Without a Monocultural Mindset?}, journal={Journal of Agricultural and Environmental Ethics}, year={2022}, month={January}, day={22}, volume={35}, issn={1573-322X}, doi={10.1007/s10806-021-09876-x}, url={https://doi.org/10.1007/s10806-021-09876-x} }
 ... ... @@ -4,7 +4,7 @@ We are only aware of one other individual who has worked on this problem: Dr. Daniel Arnold from the University of Bern. He was kind enough to share some of the progress he made with us. We summarize the main two methods with us \cite{arnold-paper}. We summarize the main two methods he developed below. The first method is hill climbing. Here ... ...
 \begin{thebibliography}{1} \bibitem{arnold-paper} Daniel Arnold. \newblock Zur optimalen anordnung von pflanzen in mischkulturen. \newblock personal communication, February 2022. \bibitem{https://doi.org/10.48550/arxiv.1910.11369} Mathieu Blondel. \newblock Structured prediction with projection oracles, 2019. \bibitem{agroscope-matrix} Carlos Cotrini. \newblock Relationship matrix 1 from agroscope. \newblock personal communication, January 2022. \bibitem{cotrini-matrix} Carlos Cotrini. \newblock Relationship matrix 2 from agroscope. \newblock personal communication, January 2022. \bibitem{Ditzler2022} Lenora Ditzler and Clemens Driessen. \newblock Automating agroecology: How to design a farming robot without a monocultural mindset? \newblock {\em Journal of Agricultural and Environmental Ethics}, 35, January 2022. \bibitem{agroscope-slides} Julian Helfenstein. \newblock Living lab honesta slides. \newblock personal communication, February 2022. \bibitem{alma990005774300205503} David S.~Johnson Michael R.~Garey. \newblock {\em COMPUTERS AND INTRACTABILITY A Guide to the Theory of ... ...
 ... ... @@ -3,44 +3,44 @@ Capacity: max_strings=200000, hash_size=200000, hash_prime=170003 The top-level auxiliary file: thesis.aux The style file: plain.bst Database file #1: refs.bib You've used 1 entry, You've used 7 entries, 2118 wiz_defined-function locations, 502 strings with 4159 characters, and the built_in function-call counts, 235 in all, are: = -- 19 > -- 7 526 strings with 4746 characters, and the built_in function-call counts, 1518 in all, are: = -- 140 > -- 55 < -- 0 + -- 3 - -- 2 * -- 10 := -- 47 add.period$-- 3 call.type$ -- 1 change.case$-- 3 + -- 23 - -- 16 * -- 63 := -- 265 add.period$ -- 20 call.type$-- 7 change.case$ -- 28 chr.to.int$-- 0 cite$ -- 1 duplicate$-- 12 empty$ -- 23 format.name$-- 2 if$ -- 47 cite$-- 7 duplicate$ -- 57 empty$-- 150 format.name$ -- 16 if$-- 323 int.to.chr$ -- 0 int.to.str$-- 1 missing$ -- 2 newline$-- 8 num.names$ -- 2 pop$-- 8 int.to.str$ -- 7 missing$-- 3 newline$ -- 37 num.names$-- 14 pop$ -- 52 preamble$-- 1 purify$ -- 3 purify$-- 22 quote$ -- 0 skip$-- 6 skip$ -- 51 stack$-- 0 substring$ -- 5 swap$-- 1 substring$ -- 35 swap$-- 7 text.length$ -- 0 text.prefix$-- 0 top$ -- 0 type$-- 2 type$ -- 26 warning$-- 0 while$ -- 2 width$-- 2 write$ -- 12 while$-- 14 width$ -- 8 write\$ -- 71
No preview for this file type
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!