well with larger spaces the point is moot. if a hole can be solved with three more more pieces it really does not matter which piece is placed as long as it does not build c's or other bad shapes, ie it squares the hole and that should always happen as long as the bot is programmed to place the piece is a way that the most piece edge is touching hole edge. writing a method to test if a hole can be solved with three or less pieces, should be easy because that is just counting the total number of open spaces if 15 or less it can be solved by three pieces and then smart placing would be required but that is as easy as saying if a piece placed in a position requires two pieces or even one piece that is rare then that placement is not a usable moved. also testing if a mp can be made using existing pieces should be the first test if it can be solved with 3 or less pieces. also a note on threading, unless you have a smart way to prioritize mouse movement and piece placement it will be no faster then if only one thread is used. this is because there is always one focus hole, a hole that has a shaking piece or is flashing red, a bot should always test this hole first as if not filled is 3 turns the hole will cause score loss and may mess with the bot. because holes can be ranked due to the decay timer in the puzzle it would be smarter to just test one hole at a time as regardless of if all the holes are tested one hole needs the focus and should get preferential placement. i hope you understand, and sorry about the grammar its late.
also finally a last note on all this, if you intend to make this a bot get high ranking you need to include in your code a method that will test best fit. as in regardless of which hole needs a piece which placement in all the holes is best fit. and this needs to be smart as hell because it needs to understand how bonuses work so that it will both not let a hole fill with a bad placement but also allow that if a better placement comes after ie a chain masterpiece should be uninterrupted even at the cost of a botched hole and so on. if you wana talk send me a message with our skype and i can try to explain it better or reply and let me know what you need.
also finally a last note on all this, if you intend to make this a bot get high ranking you need to include in your code a method that will test best fit. as in regardless of which hole needs a piece which placement in all the holes is best fit. and this needs to be smart as hell because it needs to understand how bonuses work so that it will both not let a hole fill with a bad placement but also allow that if a better placement comes after ie a chain masterpiece should be uninterrupted even at the cost of a botched hole and so on. if you wana talk send me a message with our skype and i can try to explain it better or reply and let me know what you need.
Comment