Jump to content
BrainDen.com - Brain Teasers

unreality

Members
  • Posts

    6378
  • Joined

  • Last visited

Everything posted by unreality

  1. I don't know who asked, but the only crewmen are you 9 (including Yara) [see prev. page for info on our two new crew members] Also, Zara, are you setting a course for Rael, Kamala/Seyros, Venarto or something/somewhere else?
  2. Welcome aboard Raif... and while we're at it, there's a new crewmember too. The Rainsplicer hit a patch of turbulence - or so you thought - until you realized that you hit an addled Sarzavi who was flying across the route. The Sarzava announced it was travelling in the same direction as The Rainslicer, and there we go... another member of the crew.... [its backstory will be posted shortly by chrispen]
  3. sayalzah: yeah if you want. Assuming you want to do it secretly, PM me about it. But you aren't coming off as very trustworthy so far since earlier you asked if you could kill them and now you're asking if you can pass suggestions into their subconscious (just to be clear, conversational hypnosis is a real practice that involves using subtle connotations of words to become very persuasive but not necessarily all-out hypnotic)
  4. yeah we can use those in it. I'm keeping all algorithms made. And as far as new programs go, I'm a little swamped but so far I've made darth1 and izzy1 and I'm currently working on izzy2 to be followed by the rest of darth's Dawh's working on his I know and at some point I'll devise my own (I've had a few ideas bouncing around my head)
  5. yeah good point haha, thanks. He'll buy one just before leaving... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Watch your backs," Freedom-Commander Ranus Torcumb calls from the docking platform amid the buzzing hustle of the various aerial activities going on. The Tannan metropolis of Skygolde, starting on a rugged sky island deep in thick eddies of Lower Aire and rising up in a mess of smoky foundries and engine/turbine rooms (Skygolde actually has the ability to steer itself slowly, plotting long-term monthly courses across its local sector) and rising out of the smoke clouds into the dusty ruby glare where Lower Aire meets Upper Aire. That's where it starts to resemble a city, spanning massive platforms, nested towers, spiral stair systems, platform elevators, bridges, chasms, aerial courtyards, walls, guardhouses, spindly spires, spiky minarets, more platforms, docks, wharfs, landing strips, clubs, bars, apartments, markets, shops, drug dens, sky parlors, airhouses, cafes, arenas, dormitories, arcades, academies, offices, platoon bases, sentry towers, constables' jails, parks, fountains, hospitals, schools, gyms, training basins, chain platforms for flying houses, libraries/scriptoriums, large crevasses of safety netting, personal-aircraft tie-ups, pteradon perches, and even playgrounds. Skygolde roared a massive height through Middle Aire, reaching into expansive blue skies and wide views below onto the golden canyons of its construction. As the very tippity tops of Skygolde expanded into Upper Aire with opulent military offices, swimming pools, town halls, premier living quarters, beautiful gardens and picturesque spires, the launching zone known as Elite Harbor floated. Buoyed by balloons of low-density gas (trapped into their invisible shapes by aquamanced droplets of superfine steam), the metal platform circled the shining platinum Elite Harbor Control Tower at a safe distance of a few hundred yards. The harbor was like a crescent of pure copper, and quite large. The best of the best launched from here: the richest of sky merchants, the most treacherous of sky pirates, the bravest of stowaways, the strongest of sailors, the most generous of missionaries… and the most classified of covert military operations. "Zara Khan has had some - experience - with a skyship," Ranus had said before seeing them, as Yara whizzed by to buy a Basic Survival Kit before boarding time. "After overlooking your histories and double-checking your stories, we're convinced she's most qualified to be your Captainess." He paused, scratching his head casually. "Remember to watch your backs. Think like angels but act like animals. This is an extremely important mission." And now he runs beside your ship, The Rainslicer, as it takes off into the dazzling sun of Upper Aire. It's not long before he's a speck shielding its eyes as The Rainslicer, cloaked in a halo of sunlight, heads toward the adjacent sector (sector being a slice of the planet from the Core to the Aetrium, used by navigators to describe locations with accuracy). Kamala is quite a ways away, but not if a course is charted that takes you through the Storm. You still have a bit of time to decide that, though. Some time goes by in which you, the team of seven, get acquainted with each other. Mmarf the Engineer, Anonymous the Thief, Caecilius the Miner, Sarcas the Emissary, Zara Khan your Sky Pirate Captainess, Tonrana the Aquamancer and Yara the Monk. By this time you all know the backstories that you have made public to each other [on your bios]. All that is known about the quiet, reclusive Yara is that he was born and raised in a condition of poverty on Kamala itself and went to the Order of Na'tuun to turn his life around and seek harmony with the universe. As you drop into Middle Aire, letting out some of the trapped gases and adjusting the multitude of sails, pseudowings and rotating crows' nests, the situation on board is becoming increasingly tense. There are a couple of issues and official ship positions that everyone has different opinions about… some decisions need to be made: Captainess: Zara Khan First Mate: Navigator: Watchmen Shift Leader: And the more crucial decisions: * Go through the Storm and get to the desired location quicker before a rumored attack is to occur, or * Circumvent the Storm and get there a little later. The attack I spoke of came to you in news from a messenger bird (tropical in origin) sent from a Monarchy contact in the USE that Ranus told you about. The contact is code-named Phoenix and is residing within the USE sky island territory of Venarto (a large sky island, mostly acres of farmland with a few towers with aqua-pelled elevators that connects via bridges to the USE city of Shard which is very close to Venarto). Phoenix has heard rumors that the Vortex are planning a large attack on the Monarchist mining colony of Seyros, which was built in defiance of the aqua-bombing of Eyros that puportedly started the war. Thus there is another choice to be made: * Go to Venarto and attempt to meet up with Phoenix to get off on a solid foot on your investigation and share his progress, or * Go straight to Kamala (specifically Seyros) to try to stop the attack [edit: of course this is only possible if you take the quicker route there and go through the Storm], or * Go to Rael, a USE isle very near to Kamala that is suspected by Ranus to be the main pipeline of USE supplies to the Vortex organization. There's a shopkeeper there named Hyjall that reports to the Monarchy for a monthly pay Being the captain, the decisions are ultimately up to Zara Khan… but how she rules her sky ship (as a dicatorship? as a democracy?) is up to her…
  6. no, we're submitting new ones for T2
  7. unreality

    how about just taking "under God" out of the pledge? I like the rest of the pledge. It shows our unity and strength as a nation to overcome close-mindedness and fight for our freedom and diversity (ethnic/religious/cultural diversity all under the banner of the flag, etc). The founders of America were running from religious persecution and other horrible problems that arose throughout Europe when religion and government were integrated. They wanted to institute a free nation that was independent of religion (ie - secular) and allowed all faiths/lacks thereof to flourish. According to these sources: http://www.homeofheroes.com/hallofheroes/1st_floor/flag/1bfc_pledge.html http://undergod.procon.org/ http://en.wikipedia.org/wiki/Pledge_of_Allegiance#Addition_of_the_words_.22under_God.22 the "under God" wasn't added until 1954, over sixty years after the pledge was initially established.
  8. ^ we haven't even started yet lol We'll say that right now your airship is being stocked with supplies for the journey toward the other sector... and with that I'm off for the night
  9. dude I think you meant to PM that me Attention everybody: no peeking at the spoiler, haha
  10. alright, a one point margin is now counted as a tie furthermore there was an out-of-bounds exception error in the above algorithm for most/least enemy/me moves, I fixed it, here we go: int[] achose = new int[3]; int[] bchose = new int[3]; for (int vv=0; vv<i; vv++) { achose[a[vv]]++; bchose[b[vv]]++; } int enemy_least = ROCK, me_least = ROCK, enemy_most = ROCK, me_most = ROCK; int enemy_times_used_least = 0, me_times_used_least = 0, enemy_times_used_most = 0, me_times_used_most = 0; int tiebreaker; if (achose[PAPER] > achose[ROCK]) me_most = PAPER; if (achose[SCISSORS] > achose[me_most]) me_most = SCISSORS; me_times_used_most = achose[me_most]; tiebreaker = me_most; if (achose[me_most] == achose[(me_most+1)%3] || achose[me_most] == achose[(me_most+2)%3]) { tiebreaker = -2; // two-way tie if (achose[me_most] == achose[(me_most+1)%3] && achose[me_most] == achose[(me_most+2)%3]) tiebreaker = -3; /* three way tie */ } me_most = tiebreaker; if (bchose[PAPER] > bchose[ROCK]) enemy_most = PAPER; if (bchose[SCISSORS] > bchose[enemy_most]) enemy_most = SCISSORS; enemy_times_used_most = bchose[enemy_most]; tiebreaker = enemy_most; if (bchose[enemy_most] == bchose[(enemy_most+1)%3] || bchose[enemy_most] == bchose[(enemy_most+2)%3]) { tiebreaker = -2; // two-way tie if (bchose[enemy_most] == bchose[(enemy_most+1)%3] && bchose[enemy_most] == bchose[(enemy_most+2)%3]) tiebreaker = -3; /* three way tie */ } enemy_most = tiebreaker; if (achose[PAPER] < achose[ROCK]) me_least = PAPER; if (achose[SCISSORS] < achose[me_least]) me_least = SCISSORS; me_times_used_least = achose[me_least]; tiebreaker = me_least; if (achose[me_least] == achose[(me_least+1)%3] || achose[me_least] == achose[(me_least+2)%3]) { tiebreaker = -2; // two-way tie if (achose[me_least] == achose[(me_least+1)%3] && achose[me_least] == achose[(me_least+2)%3]) tiebreaker = -3; /* three way tie */ } me_least = tiebreaker; if (bchose[PAPER] < bchose[ROCK]) enemy_least = PAPER; if (bchose[SCISSORS] < bchose[enemy_least]) enemy_least = SCISSORS; enemy_times_used_least = bchose[enemy_least]; tiebreaker = enemy_least; if (bchose[enemy_least] == bchose[(enemy_least+1)%3] || bchose[enemy_least] == bchose[(enemy_least+2)%3]) { tiebreaker = -2; // two-way tie if (bchose[enemy_least] == bchose[(enemy_least+1)%3] && bchose[enemy_least] == bchose[(enemy_least+2)%3]) tiebreaker = -3; /* three way tie */ } enemy_least = tiebreaker;
  11. alright here's what we've talked about so far compiled: Yara lends Sarcas the 1 crown necessary to buy him BSK, so that's why Yara only has 10 crowns now. Also I believe Mmarf asked for Gmaster's iron helmet? ~~~ Anyway, I've been pretty busy lately but we'll definitely start pretty soon, hang on
  12. unreality

    my point was that it doesn't matter how life got here! Evolution will kick in regardless, no matter where one is in the universe, as long as our traits are defined by a genetic code and as long as we reproduce, evolution will happen
  13. unreality

    pablos: the basic tenets of evolution stand no matter how life got there in the first place. I know people that believe god created the first bio-organisms and it all evolved from there. I also know people who think a comet brought alien life to earth ("panspermia") and it all evolved from there. I also know people that think life developed out of simpler and simpler self-replicating molecules and then it all evolved from there. The truth is, it doesn't matter how life got here in the first place. Evolution is just a process that shows how genetics of lifeforms are always changing - always evolving. It's quite simple: * We've got a bunch of organisms. Some of them have genes better suited to survival, some of them don't (from mutation, etc). * Over time (and we're talking a long long long long time - millions of years - although with some bacteria you can see it in hours) the organisms with the weak genes will die, leaving organisms with stronger genes (better "fitness") * These better adapted organisms will reproduce and create new organisms of the better genomes (with slight mutations and cross-breeding of course, leading to diversity over time) That's how it works. Survival of the fittest leads to constant adaptation It's really no more complex than that. The more time you give, the more species branch off from each other and could even be classified as new species ("speciation")
  14. unreality

    yeah I've noticed that too. Everyone likes to rant on their own family members but when somebody else does, they get defensive. Another unrelated aspect of human nature I notice (and this is me too, it's everyone pretty much) is that when you forget an assignment, don't have your work/homework, etc, you desperately want someone else to have lost theirs or forgot theirs too, and ask around to try to find someone else that hasn't done it either, and when people do have it, you get mad at them. getting off track but I think these little nuggets of human nature are pretty interesting lol
  15. unreality

    I signed it And my comment was
  16. everyone that's not you is me ;D there is no "winning", only life and death you can do anything you want (technically, you can try to do anything you want - remember, this isn't a roleplay where you can do whatever you want. You are bounded by the laws of physics on this planet and your character's behavioral tendencies. You control only your own character) oh also where do you want to add the +1 hp to? you could steal money, earn money from missions/quests/adventures, loot money from dungeons, etc. Possibilities are endless... Gmaster - did you ever make a name for your Thief?
  17. now that we're overloaded with information (don't memorize anything haha, most of this won't be needed or useful until later - right now it's the story and your mission as outlined by Ranus that's most important), we'll probably actually get all the chars ready by around Monday and really ready to actually begin ;D
  18. Freedom Commander (FC) Ranus Torcumb, Order of the Fourth Star, struts around in his opulent office, cicular in shape and about ten yards across. The floor is fluffy marroon carpet and the walls are pure crystalline glass, a rare treat. You are high in the Upper Aire near the top of a SOD (Special Operations Division) military spire of the great Tanna metropolis of Skygolde. All you can see is beautiful blue sky around you in 360 degrees. Ranus Torcumb is a tall 40-something man with greying hair and a kind of casual feel that seems out of place for his profession: Subterfuge Expert. He reached his Fourth Star ranking (Monarchist soldiers start at the First Star and can only aspire to one day to be Fifth Star generals) through some of the best intel work the Monarch has ever seen. "Sit down, sit down," he barks when you come in. There are no chairs. You sit somewhat awkwardly on the fluffy floor, on top of the military seal of the Monarchy: an arm carrying the Royal Sceptre crossing with an arm carrying a flag… and on the flag was the Military Seal of the Monarchy. Talk about infinite recursion. A hasty round of introductions occurs, then Ranus gets to the good stuff: "As you know, for the past couple years the Monarchy has been fighting an immoral anti-crown organization called the Vortex. They are being harbored by Kamala, a small nation consisting of a cluster of low-flying sky-islands in the Lower Aire directly underneath - but quite a few miles below - the Ocean. Kamala has always been a primitive nation and was part of the Spice Trade Era for many years before falling on hard times again. It consists of 27 sky islands of varying sizes. Four years ago, the Vortex society began setting up base among Kamala, with funds from a backer that we believe is the United Sky Empire. It is important to understand that the Vortex is in opposition to everything we stand for as Monarchists. Their beliefs are wrong and their way of life is wrong. There are two answers as to why we sent soldiers into Kamala, and both are complicated. The first reason is to stop the Vortex. We believe that by creating a central base they are planning something against our government and against Order in general. They may spread and influence other parts of Atmos. The second reason is to protect our economic investments. For years we have been sending constant funds to Gromule mining operations near and in Kamala. There's a lot of rich sky ore to be had down there in that sector of Lower Aire. As soon as the Vortex had established themselves, they let their presence be known by aquabombing the sky island Eryos, a fringe isle of Kamala, on which we were trading with a major Gromule burrow. The bombing of Eryos provoked us into retaliation, even though only one Gromule was killed." Ranus paused and looked around to make sure he still had an awake audience. "Now some cynics say that it is the only the second reason that we pursue the destruction of the Vortex, but our opposition is not just economical but moral. Either Monarchist or anti-Monarchist forces will prevail in this world - that's how I see it. We are stronger and we will crush them. The problem is that this has become a guerrilla war. It's not the old days where armies could clash in great archipelago-wide sky battles. Although some say that is on the horizon if tensions with USE increase, that's beside the point. The Vortex are hiding within the misty, dusty, hazy islands of Kamala, sniping down our troops, killing themselves when captured and hiding among the overhanging jungles. Being beneath the Ocean, Kamala is over-saturated and a mist is always falling. This means that every one of those 27 sky isles are overgrown with jungle. The flora practically spills over the side. Not to mention there's no dazzling sunny blue skies like we've got here. It's all red haze as far as the eye can see in any imaginable direction, except for up - if you look up on Kamala you see a great shimmery mass hundreds of times the volume of it. Ah, if only the Ocean would burst open and drown Kamala away to the Core…" Ranus was lost in this pleasant thought for a while, then perked up again. "Of course that's not possible, given that the density around that area creates an eternal cycle of falling mist - but we would never want to destroy Kamala anyway. The whole idea is to protect our own tendrils there as well as defend the rights of the Kamalan people. The problem is, the Kamalans don't seem to want our help." Ranus sighed and ran a hand through his hair. "This whole situation screams of guerrilla warfare. That's why we need to cut the Vortex off not at the soldier level but at the root, at their supply chain, their financial input that allows them to fund this campaign of terror." He sits down at his desk now and flips through some papers aimlessly. "The United Sky Empire," he finally declared. "We believe that the Vortex has been receiving supplies & funds from the United Sky Empire, which as you know is a coalition of small but wealthy Tanna-run city-state sky islands floating in defense clusters near the ecuatorial region of Middle Aire. The Monarch has elected to put together a special team of operatives to sneak into the USE under the guise of tourism and infiltrate the supply chain. Ultimately we want to not only to unmask the USE's deal with the Vortex but also follow the supply chain all the way down the Vortex terrorists and infiltrate them as well. That's the most important part. We don't want to get into a scuffle with the USE, that's why this is such a sensitive situation. The less time you spend there, the better - if possible, try to hunt down connections in Kamala rather than USE, but I guess that'll be up to you." "What happens if we have evidence of USE supporting Vortex?" asks a new voice. Everyone looks to the trapdoor at the back of the room where a monk in soft tan robes has just emerged. The black insignia of the Order of Na'tuun is printed about the size of a coin where the folds of the robe meet near the monk's neck. He nods to you guys. "I'm Yara. I guess we're all on a team here, eh?" "Many smaller countries, nations, alliances, burrows and Hives are also opposed to the Vortex," FC Ranus Torcumb says, answering Yara's question. "The truth is, the Monarchy is thought to be an ancient old geezer of past times. Each year we lose more trading partners to the United Sky Empire. If we can unmask them, we can win back a lot of interspherical support as well as hope to stifle the supply line to the Vortex. That's why this is so important - we also have a chance here to restore the Monarchy to its former glory as a bastion of might amid the skies… While we wait for one more spy to add to our little party here, I suggest you take your initial payment - 25 crowns each - and buy some equipment. There's a lot more money to be made doing this, but it's also very risky. We will pay your families in the event of your deaths." Caecilius buys: 1 broad sword-13 1 bronze helmet-16 1 leather gaurd-21 1 wooden sheild-24 basic survival gear-25 The nameless thief buys: 1 Lockpicking/Locksmithy Kit - 4 crowns -4 1 Basic Survival Gear (backpack, bedroll, food rations for a week) - 1 crown -5 1 Helm Adamant (7) ~ 8 crowns *Promotional Deal* buy one get an Iron Helmet free -13 1 Steel Breastplate (15) ~ 12 crowns plus a free Dagger - 25 Yara, the Tannan Monk of the Order of Na'tuun (from the sky isle of Na'tuun) with the following skills… Basic Martial Arts Training (gotten for free) and four of choice after much discipline and study: Climbing/Vaulting/Acrobatic Skillset, Inner Eye, Stealthy Strike, and Basic Alchemy. The only one that you may not know much about is the monk-only Inner Eye skill which is basically the spiritual ability to interface mind and body into one integrated being. In this IE state, the Monk has utmost control over his or her body, and can purify diseases, purge disorders and eliminate sicknesses… but that's only an incindental ability of it. One can also change the relative weighing of the five senses and can, eg, diminish visual perception but open up a whole bigger spectrum of hearing, and so on. The Inner Eye state also allows one to view past memories like a roll of film. It takes much training and discipline to achieve such enlightenment. Anyway, Yara decides to keep most of the crown given to him, buying only the following: Quarterstaff - 3 crowns 3 Healer Packs - 9 crowns Rope - 2 crowns and so has 11 crowns left over to save. ~~~~~~~~~~~~~~~~~~~~~ I realized I forgot to post evasion stats. Evasion is based on your race, with some additives based on class and/or items. This is just a starting stat. You can further lower your evasion (remember, the lower, the better). Tanna - 75% Gromule - 80% Sarzava - 70% Lifestyles that change evasion: Warrior -6% Thief -3% Sky Pirate -3% Monk -9% Castes that change evasion: Tunnel Knight -3% Miner -3% Shields that change evasion on the limbs only: Wooden Shield -10% Metallic Shield -15% Lion Shield -20% Galaxy Shield -25% You can never drop below 0%, and it is possible to have different evasion on different body parts. Limbs already have 5% lower in the first place, and that's assumed unless specified as different. Also, the Acro Skillset and/or B Martial Arts skill will decrease your evasion across the board by 5% each time they're gotten That means these are our evasion stats for our main characters: Framm 18 - [Mmarf Artos] - Gromule Engineer (Ar Ar, Acro, Pain Tol, Traps) - 75% Gmaster - [no name yet] - Tannan Thief (Dual Wep, Locks, Escape) - 72% Pablos - [Aecilius Iucundus] - Gromule Miner (Traps, Pain Tol, B Medic) - 77% (wooden shield [-10] plus standard drop [-5] means Pablos has 62% evasion on his limbs) Sayalzah - [sarcas Genimm] - Gromule Emissary (Hypno, B Martial, Pain Tol) - 75% Music - [Zara Khan] - Tannan Sky Pirate (Dual Wep, Pain Tol, Acro) - 67% Medji - no char yet Yara - Monk of the Order of Na'tuun (B Martial, Acro, Inner Eye, Stealthy Strike, B Alchemy) - 56% ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Note: the figures may not be entirely accurate since most people haven't bought equipment yet and shields could lower evasion on the limbs further
  19. btw, the word Healer (such as in "healer only") refers to any of the following race/class combos: Tanna Druid, Gromule Alchemist, Sarzava Healer. Your debriefing will be posted shortly, please continue to buy equipment and stuff around this, this is just a bit of reading to start it off
  20. here's an even more general thing lol: int[] achose = new int[3]; int[] bchose = new int[3]; for (int vv=0; vv<i; vv++) { achose[a[vv]]++; bchose[b[vv]]++; } int enemy_least = ROCK, me_least = ROCK, enemy_most = ROCK, me_most = ROCK; int enemy_times_used_least = 0, me_times_used_least = 0, enemy_times_used_most = 0, me_times_used_most = 0; if (achose[PAPER] > achose[ROCK]) me_most = PAPER; if (achose[SCISSORS] > achose[me_most]) me_most = SCISSORS; me_times_used_most = achose[me_most]; if (achose[me_most] == achose[(me_most+1)%3] || achose[me_most] == achose[(me_most+2)%3]) { me_most = -2; // two-way tie if (achose[me_most] == achose[(me_most+1)%3] && achose[me_most] == achose[(me_most+2)%3]) me_most = -3; /* three way tie */ } if (bchose[PAPER] > bchose[ROCK]) enemy_most = PAPER; if (bchose[SCISSORS] > bchose[enemy_most]) enemy_most = SCISSORS; enemy_times_used_most = bchose[enemy_most]; if (bchose[enemy_most] == bchose[(enemy_most+1)%3] || bchose[enemy_most] == bchose[(enemy_most+2)%3]) { enemy_most = -2; // two-way tie if (bchose[enemy_most] == bchose[(enemy_most+1)%3] && bchose[enemy_most] == bchose[(enemy_most+2)%3]) enemy_most = -3; /* three way tie */ } if (achose[PAPER] < achose[ROCK]) me_least = PAPER; if (achose[SCISSORS] < achose[me_least]) me_least = SCISSORS; me_times_used_least = achose[me_least]; if (achose[me_least] == achose[(me_least+1)%3] || achose[me_least] == achose[(me_least+2)%3]) { me_least = -2; // two-way tie if (achose[me_least] == achose[(me_least+1)%3] && achose[me_least] == achose[(me_least+2)%3]) me_least = -3; /* three way tie */ } if (bchose[PAPER] < bchose[ROCK]) enemy_least = PAPER; if (bchose[SCISSORS] < bchose[enemy_least]) enemy_least = SCISSORS; enemy_times_used_least = bchose[enemy_least]; if (bchose[enemy_least] == bchose[(enemy_least+1)%3] || bchose[enemy_least] == bchose[(enemy_least+2)%3]) { enemy_least = -2; // two-way tie if (bchose[enemy_least] == bchose[(enemy_least+1)%3] && bchose[enemy_least] == bchose[(enemy_least+2)%3]) enemy_least = -3; /* three way tie */ } again, not super efficient, just over-general. But actually I have to use the majority of this plus the new addition in a program I'm writing for someone's algorithm these new [me|enemy]_times_used_[most|least] variables are the same as the respective values, ie, me_times_used_most is the same as achose[me_most] EXCEPT if the algorithm changes those values in the case of two- or three- way ties. The intention of the new values is to preserve the number of times the tying least/most was used (which doesn't care about what the least used or most used actually is) while changing what is said to be the most used or least used move. That's a little complex but it's part of a program I'm writing for DarthNoob so that inspired me to put up this general code
  21. due to the popularity of it, I have written a general code for most/least/etc uses of moves by you and/or the enemy int[] achose = new int[3]; int[] bchose = new int[3]; for (int vv=0; vv<i; vv++) { achose[a[vv]]++; bchose[b[vv]]++; } int enemy_least = ROCK, me_least = ROCK, enemy_most = ROCK, me_most = ROCK; if (achose[PAPER] > achose[ROCK]) me_most = PAPER; if (achose[SCISSORS] > achose[me_most]) me_most = SCISSORS; if (bchose[PAPER] > bchose[ROCK]) enemy_most = PAPER; if (bchose[SCISSORS] > bchose[enemy_most]) enemy_most = SCISSORS; if (achose[PAPER] < achose[ROCK]) me_least = PAPER; if (achose[SCISSORS] < achose[me_least]) me_least = SCISSORS; if (bchose[PAPER] < bchose[ROCK]) enemy_least = PAPER; if (bchose[SCISSORS] < bchose[enemy_least]) enemy_least = SCISSORS; in case of ties, ROCK is always the output in the above code. This next code is more complicated but it handles ties too: int[] achose = new int[3]; int[] bchose = new int[3]; for (int vv=0; vv<i; vv++) { achose[a[vv]]++; bchose[b[vv]]++; } int enemy_least = ROCK, me_least = ROCK, enemy_most = ROCK, me_most = ROCK; if (achose[PAPER] > achose[ROCK]) me_most = PAPER; if (achose[SCISSORS] > achose[me_most]) me_most = SCISSORS; if (achose[me_most] == achose[(me_most+1)%3] || achose[me_most] == achose[(me_most+2)%3]) { me_most = -2; // two-way tie if (achose[me_most] == achose[(me_most+1)%3] && achose[me_most] == achose[(me_most+2)%3]) me_most = -3; /* three way tie */ } if (bchose[PAPER] > bchose[ROCK]) enemy_most = PAPER; if (bchose[SCISSORS] > bchose[enemy_most]) enemy_most = SCISSORS; if (bchose[enemy_most] == bchose[(enemy_most+1)%3] || bchose[enemy_most] == bchose[(enemy_most+2)%3]) { enemy_most = -2; // two-way tie if (bchose[enemy_most] == bchose[(enemy_most+1)%3] && bchose[enemy_most] == bchose[(enemy_most+2)%3]) enemy_most = -3; /* three way tie */ } if (achose[PAPER] < achose[ROCK]) me_least = PAPER; if (achose[SCISSORS] < achose[me_least]) me_least = SCISSORS; if (achose[me_least] == achose[(me_least+1)%3] || achose[me_least] == achose[(me_least+2)%3]) { me_least = -2; // two-way tie if (achose[me_least] == achose[(me_least+1)%3] && achose[me_least] == achose[(me_least+2)%3]) me_least = -3; /* three way tie */ } if (bchose[PAPER] < bchose[ROCK]) enemy_least = PAPER; if (bchose[SCISSORS] < bchose[enemy_least]) enemy_least = SCISSORS; if (bchose[enemy_least] == bchose[(enemy_least+1)%3] || bchose[enemy_least] == bchose[(enemy_least+2)%3]) { enemy_least = -2; // two-way tie if (bchose[enemy_least] == bchose[(enemy_least+1)%3] && bchose[enemy_least] == bchose[(enemy_least+2)%3]) enemy_least = -3; /* three way tie */ } it's not the most efficient but the idea is to have it all there and then just remove the parts not needed by an algorithm
  22. here's the code with medji's program back to normal (and its optimal state) and everyone's in their final T1 state: and here are the results of the tourney. I bolded and reddened the ties: Final Results: hawk vs test1: hawk wins!!! hawk vs test2: test2 wins!!! hawk vs test3: test3 wins!!! hawk vs izzy: izzy wins!!! hawk vs phil: phil wins!!! hawk vs dnoob: dnoob wins!!! hawk vs jarze: jarze wins!!! hawk vs medji: hawk wins!!! hawk vs mr_apple_pi: It was a tie!!! test1 vs test2: test2 wins!!! test1 vs test3: It was a tie!!! test1 vs izzy: It was a tie!!! test1 vs phil: test1 wins!!! test1 vs dnoob: dnoob wins!!! test1 vs jarze: jarze wins!!! test1 vs medji: medji wins!!! test1 vs mr_apple_pi: mr_apple_pi wins!!! test2 vs test3: test2 wins!!! test2 vs izzy: test2 wins!!! test2 vs phil: test2 wins!!! test2 vs dnoob: test2 wins!!! test2 vs jarze: It was a tie!!! test2 vs medji: test2 wins!!! test2 vs mr_apple_pi: It was a tie!!! test3 vs izzy: test3 wins!!! test3 vs phil: phil wins!!! test3 vs dnoob: dnoob wins!!! test3 vs jarze: test3 wins!!! test3 vs medji: test3 wins!!! test3 vs mr_apple_pi: mr_apple_pi wins!!! izzy vs phil: izzy wins!!! izzy vs dnoob: dnoob wins!!! izzy vs jarze: jarze wins!!! izzy vs medji: izzy wins!!! izzy vs mr_apple_pi: mr_apple_pi wins!!! phil vs dnoob: phil wins!!! phil vs jarze: phil wins!!! phil vs medji: medji wins!!! phil vs mr_apple_pi: mr_apple_pi wins!!! dnoob vs jarze: jarze wins!!! dnoob vs medji: medji wins!!! dnoob vs mr_apple_pi: mr_apple_pi wins!!! jarze vs medji: jarze wins!!! jarze vs mr_apple_pi: jarze wins!!! medji vs mr_apple_pi: medji wins!!! Win Count: hawk: 2 test1: 1 test2: 7 test3: 4 izzy: 3 phil: 4 dnoob: 4 jarze: 6 medji: 4 mr_apple_pi: 5 that's 40 successful games and 5 ties, which matches what it should be with 10 programs with N programs, the total number of games is N/2 * (N-1), so with 10 programs, we should have 45 games, and indeed we do, so that matches up. I added proposal two onto the scoring system (that is, adding +0.5 to each in the event of a tie) // RPS by Unreality // for Brainden import java.util.Scanner; import java.util.Random; // for use only in the "rand" test program! public class rps { public static final int ROCK = 0; public static final int PAPER = 1; public static final int SCISSORS = 2; public static final int ROUNDS = 50; public static int rpsgo(int algoNum, int i, int[] a, int[] b) { if (algoNum==0) // hawk { if (i==0) return (int)Math.pow(2,21) % 3; int[] num = new int[3]; for (int z=0; z<i; z++) { num[b[z]]++; } int x=0; if (num[0] > num[1]) { x = 0 ; } else if (num[1] > num[0]) { x = 1 ; } else { x = num[x] % 2 ; } if (num[2] > num[x]) x = 2; return (x+1)%3; } else if (algoNum==1) // test1 { if (i==0) return SCISSORS; return b[i-1]; } else if (algoNum==2) // test2 { return i % 3; } else if (algoNum==3) // test3 { int sum = 0; for (int z=0; z<i; z++) { sum += (a[z] + b[z]); } sum %= 3; return sum; } else if (algoNum==4) // izzy { // use sci until sci loses; if sci loses at i=0, discard and use sci again til sci loses // then use pap til pap loses // then rock til rock loses // then do whatever beats what they've used most if (i==0 || (i==1 && b[0]==0)) return SCISSORS; boolean lostWithRock = false; search: for (int z=0; z<i; z++) { if (a[z]==0 && b[z]==1) { lostWithRock = true; break search; } } if (lostWithRock) { // do what beats what they've done most int[] num = new int[3]; for (int y=0; y<i; y++) { num[b[y]]++; } int x=0; if (num[0] > num[1]) { x = 0 ; } else if (num[1] > num[0]) { x = 1 ; } else { x = num[x] % 2 ; } if (num[2] > num[x]) x = 2; return (x+1)%3; } else { // do what won last time, or, if lost last time, advance one from sci -> pap -> rock (2 -> 1 -> 0) return a[i-1] - (((a[i-1] - b[i-1] + 3) % 3) / 2); } } else if (algoNum==5) // phil { if (i==0) return PAPER; int[] c = new int[i*3]; int y = 0; for (int z=0; z<i; z++) { if (b[z]==0) { c[y] = 1; c[y+1] = 2; y+= 2; } if (b[z]==1) { c[y] = 1; c[y+1] = 0; c[y+2] = 2; y+= 3; } if (b[z]==2) { c[y] = 0; y++; } } return c[i+1]; } else if (algoNum==6) // backatyou { int myWins = 0; int hisWins = 0; int[] hisWinMoves = new int[3]; int[] hisLoseMoves = new int[3]; int[] hisTieMoves = new int[3]; for(int j = 0; j < i; j++) { int myMove = a[j]; int hisMove = b[j]; if(myMove == ROCK && hisMove == SCISSORS || myMove == SCISSORS && hisMove == PAPER || myMove == PAPER && hisMove == ROCK) myWins++; if(hisMove == ROCK && myMove == SCISSORS || hisMove == SCISSORS && myMove == PAPER || hisMove == PAPER && myMove == ROCK) hisWins++; if(hisWins > myWins) { hisWinMoves[hisMove]++; } else if(myWins > hisWins) { hisLoseMoves[hisMove]++; } else { hisTieMoves[hisMove]++; } } int[] myPick = null; if (hisWins > myWins) myPick = hisWinMoves; else if (myWins > hisWins) myPick = hisLoseMoves; else myPick = hisTieMoves; int max = ROCK; if(myPick[PAPER] > myPick[ROCK]) { max = PAPER; if(myPick[SCISSORS] > myPick[PAPER]) max = SCISSORS; } else if(myPick[SCISSORS] > myPick[ROCK]) max = SCISSORS; int move; if(max == ROCK) move = PAPER; else if(max == PAPER) move = SCISSORS; else move = ROCK; return(move); } else if (algoNum==7) // dnoob { if (i==0) return ROCK; int n = i; int numsub = 0; int fib = 0; int fibc = 1; int temp; while (n - fibc >= 0) { n -= fibc; numsub++; temp = fibc; fibc += fib; fib = temp; } int x = ROCK; if (i%2 == 1) { // borrowing some code from hawk here... int[] num = new int[3]; for (int z=0; z<i; z++) { num[b[z]]++; } if (num[ROCK] > num[1]) { x = ROCK ; } else if (num[PAPER] > num[ROCK]) { x = PAPER ; } else { x = num[x] % 2 ; /*pseudorandom if tie*/ } if (num[SCISSORS] > num[x]) x = SCISSORS; } return (numsub + x) % 3; } else if (algoNum==8) // rand { Random rangen = new Random(); return rangen.nextInt(3); } else if (algoNum==9) // allrock { return ROCK; } else if (algoNum==10) // jarze { if (i==0) return ROCK; return (b[i-1]+1)%3; } else if (algoNum==11) // medji { if (i==0) return PAPER; if (i<5) return b[i-1]; int sumi=0; for (int zz=i-5; zz<i; zz++){ sumi += b[zz]; } if (sumi%2 == 1) { int[] num = new int[3]; for (int z=(i-25 + Math.abs(i-25))/2; z<i; z++) { num[b[z]]++; } int x=0; if (num[0] > num[1]) { x = 0 ; } else if (num[1] > num[0]) { x = 1 ; } else { x = num[x] % 2 ; } if (num[2] > num[x]) x = 2; return (x+1)%3; } else return b[i-1]; } else if (algoNum==12) // mr apple (pi) { int[] digsPi = { 3,1,4,1,5, 9,2,6,5,3, 5,8,9,7,9, 3,2,3,8,4, 6,2,6,4,3, 3,8,3,2,7, 9,5,0,2,8, 8,4,1,9,7, 1,6,9,3,9, 9,3,7,5,1 }; int dig = digsPi[i]; if (dig > 0 && dig < 4) return dig-1; else if (dig==4) { // opp's most move int[] num = new int[3]; for (int z=0; z<i; z++) { num[b[z]]++; } int x=0; if (num[0] > num[1]) { x = 0 ; } else if (num[1] > num[0]) { x = 1 ; } else { x = num[x] % 2 ; } if (num[2] > num[x]) x = 2; return x; } else if (dig==5 || dig==6) { // counter opp's most move int[] num = new int[3]; for (int z=0; z<i; z++) { num[b[z]]++; } int x=0; if (num[0] > num[1]) { x = 0 ; } else if (num[1] > num[0]) { x = 1 ; } else { x = num[x] % 2 ; } if (num[2] > num[x]) x = 2; return (x+1)%3; } else if (dig==7 || dig==8) { // self's least played move int[] num = new int[3]; for (int z=0; z<i; z++) { num[a[z]]++; } int x=0; if (num[0] > num[1]) { x = 1 ; } else if (num[1] > num[0]) { x = 0 ; } else { x = num[x] % 2 ; } if (num[x] > num[2]) x = 2; return x; } else if (dig==9) { // self's most played move int[] num = new int[3]; for (int z=0; z<i; z++) { num[a[z]]++; } int x=0; if (num[0] > num[1]) { x = 0 ; } else if (num[1] > num[0]) { x = 1 ; } else { x = num[x] % 2 ; } if (num[2] > num[x]) x = 2; return x; } else if (dig==0) { // opp's most recent move return b[i-1]; } else return -1; } else return ROCK; //return ROCK; } public static String conv(int yeah) { if (yeah==ROCK) return " rock "; if (yeah==PAPER) return " paper "; if (yeah==SCISSORS) return "scissors"; return "you've got a problem"; } public static void main(String[] args) { // one on one system: /* Scanner inp = new Scanner(System.in); String[] names = { "hawk", "test1", "test2", "test3", "izzy", "phil", "backatyou", "dnoob", "rand", "allrock", "jarze", "medji" , "mr_apple_pi" }; System.out.println("Welcome to R/P/S!"); for (int j=0; j<names.length; j++) { System.out.println(j + " (" + names[j] + ")");} System.out.print("First Algorithm: "); int algo1 = inp.nextInt(); System.out.print("Second Algorithm: "); int algo2 = inp.nextInt(); System.out.print("\n\n"+names[algo1]+" vs "+names[algo2]+"\n\n"); int[] ar1 = new int[ROUNDS]; int[] ar2 = new int[ROUNDS]; int[] wins = new int[ROUNDS]; for (int k=0; k<ROUNDS; k++) { ar1[k] = rpsgo(algo1, k, ar1, ar2); ar2[k] = rpsgo(algo2, k, ar2, ar1); wins[k] = ( 3 + ar1[k] - ar2[k] ) % 3; // 0 -> tie // 1 -> one wins // 2 -> two wins } int oneWins=0; int twoWins=0; for (int l=0; l<ROUNDS; l++) { System.out.println(conv(ar1[l]) + " vs " + conv(ar2[l])); if (wins[l]==1) { oneWins++; } if (wins[l]==2) { twoWins++; } } int ties = ROUNDS - oneWins - twoWins; String msg; if (oneWins > twoWins) msg = names[algo1]+" wins!!!"; else if (twoWins > oneWins) msg = names[algo2]+" wins!!!"; else msg = "It was a tie!!!"; System.out.println("\n"+names[algo1]+" won "+oneWins+" games and "+names[algo2]+" won " +twoWins+ " ~ there were " + ties + " ties"); System.out.println(msg); */ // round robin system: String[] names = { "hawk", "test1", "test2", "test3", "izzy", "phil", "backatyou", "dnoob", "rand", "allrock", "jarze", "medji" , "mr_apple_pi" }; int[] algos = { 0, 1, 2, 3, 4, 5, 7, 10, 11, 12 }; // all but allrock (9) rand (8) and backatyou (6) String financ = ""; int n = algos.length; double[] nw = new double[n]; int numGames = n/2 * (n - 1); for (int nn=0; nn<n; nn++) { for (int nnn = nn+1; nnn<n; nnn++) { // game between algos[nn] and algos[nnn] int algo1 = algos[nn]; int algo2 = algos[nnn]; System.out.print("\n\n"+names[algo1]+" vs "+names[algo2]+"\n"); int[] ar1 = new int[ROUNDS]; int[] ar2 = new int[ROUNDS]; int[] wins = new int[ROUNDS]; for (int k=0; k<ROUNDS; k++) { ar1[k] = rpsgo(algo1, k, ar1, ar2); ar2[k] = rpsgo(algo2, k, ar2, ar1); wins[k] = ( 3 + ar1[k] - ar2[k] ) % 3; // 0 -> tie // 1 -> one wins // 2 -> two wins } int oneWins=0; int twoWins=0; for (int l=0; l<ROUNDS; l++) { System.out.println(conv(ar1[l]) + " vs " + conv(ar2[l])); if (wins[l]==1) { oneWins++; } if (wins[l]==2) { twoWins++; } } int ties = ROUNDS - oneWins - twoWins; String msg; if (oneWins > twoWins) { msg = names[algo1]+" wins!!!"; nw[nn]++; } else if (twoWins > oneWins) { msg = names[algo2]+" wins!!!"; nw[nnn]++; } else { msg = "It was a tie!!!"; nw[nn] += 0.5; nw[nnn] += 0.5; } System.out.println("\n"+names[algo1]+" won "+oneWins+" games and "+names[algo2]+" won " +twoWins+ " ~ there were " + ties + " ties"); System.out.println(msg); financ += (names[algo1]+" vs "+names[algo2] + ": " + msg + "\n"); } } System.out.print("\n\nFinal Results:\n" + financ + "\n\nWin Count:\n"); for (int abc=0; abc<n; abc++) System.out.println(names[algos[abc]]+": "+nw[abc]); } } and here are the results from that: Win Count: hawk: 2.5 test1: 2.0 test2: 8.0 test3: 4.5 izzy: 3.5 phil: 4.0 dnoob: 4.0 jarze: 6.5 medji: 4.0 mr_apple_pi: 6.0 Those results match up since the ties were: hawk, apple pi; test1, test3; test1, izzy; test2, jarze; test2, apple pie; so hawk should add .5, test1 should add 1, test2 should add 1, test3 should add .5, izzy should add .5, jarze should add .5 and apple pie should add 1 from prior results, and that's what happened Twas a good idea to add .5 in case of ties, it makes sense. But I wont add the first proposal into the code without some feedback: right now ties are defined when both algorithms have won the same number of rounds/matches in a game. I think it's a good idea to make it a tie if one algorithm has just 1 more win than the other. What do you think?
  23. I got word back from phil that he had wanted his first move PAPER. So with that, here's a tourney between every algo except allrock, rand and backatyou (since there is probably an error somewhere in that one) Win Count:hawk: 2 test1: 1 test2: 7 test3: 4 izzy: 3 phil: 4 dnoob: 4 jarze: 6 medji: 4 mr_apple_pi: 5 (from now on the first move of jarze is locked in as ROCK and the first move of phil is locked in as PAPER) medji wanted to test something where it was just option one, ie, the last-25 sample (but still the b[i-1] behavior for the first 5 moves). Win Count:hawk: 2 test1: 1 test2: 7 test3: 4 izzy: 3 phil: 4 dnoob: 4 jarze: 6 medji: 3 (one less win) mr_apple_pi: 6 (one more win) so that wasn't an advantageous change, medji. It seems that the entire idea of playing what beats the enemy's most used move doesn't work too well, because that's what hawk does too ~~~ and if everyone agrees with the two Proposals I put forth in my last post, I'll program those in for T2
  24. thanks for the input DarthNoob - I'm considering doing these two Proposals: (1) making a win by 1 match a tie (wins by 2 or more matches are still wins) (2) making ties count as +0.5 to each contestant instead of +0 I won't extend the game because as dawh said, 50 rounds is sufficient, and ties within that many rounds will be perpretrated forever. The program might never end. And unless there is some major advantage you see of 51 rounds over 50, I think we should stick with 50 rounds. The only difference I could see is if two programs are winning alternatingly, but in this case Proposal #1 of this post would make that a tie anyway, so the odd/even-ness of the round count wouldn't affect that
×
×
  • Create New...