The psychotic drowns in the same waters in which the mystic swims with delight.
The psychotic drowns in the same waters in which the mystic swims with delight.
If the king does not lead, how can he expect his subordinates to follow?
i think i will move this blog up a level since i don't seem to be doing much else with this site
got it clicking the tiles to spell a word
it took a while to figure out that i had to call mouseRelease to perform a click otherwise the os would think i was holding the mouse down
now i need to do a loop thing, detect whether submit button is enabled or not, and read the grid at the right time
also make a simple ui to start/stop the bot and set different strategies
maybe some performance stuff, i can't tell what is causing it to be slow, could be loading the dictionary but i suspect it is parsing the tile grid image
this bot produces so many diamond tiles (which grant one of each potion type) that i could just purify if the word fails (assuming locked tile) and still have an excess of purify potions
deciding when to use powerup potions (and perhaps even detecting how many are left) could also be part of the strategy
using powerup potions gives you more powerup potions if you annihilate an enemy, giving you a diamond tile
been working on a bot to play the game bookworm adventures
so far the bot can take a screenshot of the game while it's running, parse the grid of tiles, and find the possible words it could spell
the grid image is parsed by thresholding each tile and comparing it to a prepared set of letter images, which works well since the letter part of each tile is almost completely black
it also detects gem tiles and plague tiles using the tile's average hue
i haven't seen it fail yet on gem tiles, but i tried to implement this for smashed tiles and it didn't work anywhere near consistently enough
smashed tiles have a hue too similar to diamond tiles
i tried to use brightness as well as hue but it didn't work because the brightness of tiles varies too much (even ignoring the black pixels)
might try to just cut the center out and compare the tile uncropped to a smashed tile image
locked tiles are an issue as well, they're near identical to normal tiles if you average everything out
locked tiles are one of the tiles i really need to be able to detect so the bot can know these tiles can't be used, i could probably go without detecting plague/smashed tiles
unless i went and tried to click every tile after a word failed to submit, and checked which ones couldn't be selected, but again not an ideal solution
there's also other tile types from the sequel bookworm adventures 2 that i haven't done yet, fire tiles might be a problem
would prefer to avoid using opencv because it's a bit overkill and my bot is written in java, but there would definitely be something in there that would solve these problems
the dictionary works by creating a tree when it loads the words, so i don't have to check over every word (probably slow) or every permutation of letters (definitely slow)
each node in the tree represents a letter (e.g. 'f') and it has child nodes representing the number of times the next letter is in the word (e.g. 0, 1, 2... 'g's)
at the bottom there is a list of unsorted (i.e. 'balloon' not 'abllnoo') words
when searching we want all subanagrams, not just all anagrams, so we take not just the nodes corresponding to the given set of letters, but also all recursively sum all sets of letters less than the given set (e.g. if the letters contain 2 't's, we want all branches with 0, 1, or 2 't's)
i realised after writing it that my dictionary implementation is probably inefficient so i might change it later, since it's unnecessary to store 26 layers when no word has all 26 letters
instead i could just make a tree where each node is a letter+frequency and the layers are the position of a letter in the word, although what i have now seems fast enough
java's Robot class made it easy to take a screenshot and will make it easy to move mouse and click when i get to that part, but one weakness is that i can't take a screenshot unless the game window is maximised and focused
apparently there are ways to achieve this but it would involve some annoying windows api stuff, i'll do this later if at all
i want to try different strategies of spelling words and see what the fastest/average times i can get in arena mode (where you fight all the bosses in order and are timed) are
one strategy i used while playing the game normally was 'saving up' a long word with a lot of gem tiles and then finally use it when i get the right tiles, maybe the bot could do better by using up the uncommon and difficult to use letters like 'k' and 'v' in short words without using the gem tiles (which give a percentage damage boost) so it can do a very long word using a power up potion
todo add images to this post
a sheep does not concern itself with the opinions of grass
being based isn't about having a particular affiliation or set of beliefs. it's about being contrary to the people around you
i wouldn't go so far as to say it was a virtue and i generally don't have opinions of that nature. if everyone thought for themselves then the species would definitely be worse off, but maybe having a few who try to act in new ways (and often fail) is desirable.
This site is not intended to be viewable with any text-based or GUI browser, on any screen resolution or scaling size. fuck you.
queens gambit aborted: 1. d4 abort! leaving black with a strong initiative and good chances to have fun in his next game
todo change dates to '5 minutes ago' etc instead of showing whole date. i think there is a python library for that
a lot of life seems to be more about fighting against yourself rather than fighting against other people. there's definitely parts of human nature that weaken the individual to strengthen the species
having your beliefs challenged should weaken them
there is a lot of wasted horizontal space so i would like to try putting the posts in columns
trying to decide on a colour. perhaps i could randomise it from a list of colours every time i post
three aphorisms i made that are important to my worldview so i don't forget them:
you are not real
everything exists for a reason (usually a loosely 'evolutionary' one)
only believe things that you know to be true (firsthand, not absorbed from others)
testing edit feature
edit: also added ability to edit/delete specific posts based on post number, not just the last post
but looks like it might be a while before i see its effects since i set the ppp to 50
it was more difficult to implement than i thought it would be. in the end i set the pagination to display "latest" instead of the last page if it's more than 3 pages old, otherwise i wouldn't be able to take advantage of not having to regenerate the pages since the pagination would be changing after i added more posts
also edit and delete scripts + macros to edit and delete the last post
i would also like to make the posts take up even less space so i can spam a ton of them and not have to scroll
todo: use creation date of file instead of storing timestamp in filename
test start of next page
test end of page
ok i think i'll do the pagination now.
i could have it so the older pages don't need to be updated every time. but that would mean that the front page might only have one or two posts if the page had just rolled over. hmm
yeah i'm gonna do that
scp seems to work for files
with pscp -scp file.png email@example.com:~/public_html/img/ on windows
this will also be a blog for stuff im making. i just need a proper way of uploading images
they must have made bing look similar to google on purpose. i didn't even realise i was using it on a computer which only had the ie successor on until it was too late
ok so yes yes yes yes yes yes yes yes yes yers yes yes yes rys res yes yes yes yes yes yes yes yes yes yes yes yes yes yes no yes yes yes yesa
I made this simple blog using python. I create text files in a directory using a script and then run another script to turn them into HTML.
The timestamp is stored in the filename of the text file.
Features to add:
- Better line breaks
- Better CSS (for my whole space)
- Titles (maybe)
- Timezones? (if possible)
Formatting (seems unnecessary)
Fifth new post.
New blog post.