{"repo":"Serranegra/optifarm","free":true,"listed":false,"github":"https://github.com/Serranegra/optifarm","clone":"git clone https://github.com/Serranegra/optifarm.git","description":"Optimal Minecraft farm layouts via exact CP-SAT optimisation","language":"Python","stars":49,"topics":["cp-sat","minecraft","optimization","or-tools"],"license":"MIT","category":"game-templates","readme_excerpt":"optifarm Mathematically optimal Minecraft farm layouts. Give it a terrain and a crop; it returns the block placement that maximises production, and a proof that nothing better exists — via an OR-Tools CP-SAT model. Implements sugarcane , cactus , wheat and melon — four rules that disagree about everything (cane needs water beside it, cactus needs nothing solid beside it, wheat needs water within 4 in every direction , melon needs a free block to grow its fruit into and will not share it) and share every line of the core. Adding the next crop is a new rule file and nothing else. Results Two kinds of picture, because there are two honest things to say. On open, symmetric ground a hand pattern is a fair opponent — stripes, checkerboards and lattices are exactly what a player stamps across an empty field — so the optimum goes beside one and the comparison means something. On terrain with obstacles there is no pattern to stamp, so there is nothing fair to put beside the optimum; the picture is just the solver's answer on ground a real farm actually has. Every layout below is legal and comes straight out of examples/generate readme images.py — nothing is posed. On open ground, where a pattern is a fair fight Four crops, four rules, and they disagree about whether this library is worth running. Sugarcane is the one that says yes. Cane needs a water block beside it, water costs a cell and feeds at most four, so where the water goes is a real trade — and the 1×2 stripes people build o","default_branch":null,"files":null,"tree":[],"storefront":"/r/Serranegra","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Serranegra/optifarm/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}