Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Alexhans

Pages: [1] 2
1
What goes around comes around

Because I felt the nostalgia of posting it here after such a long time and I still receive the odd email here and there with requests...

Here it goes:

----------------------------

Hi,

Since 2010, I've been making spreadsheets for the Euro and World Cup to compete with my friends and coworkers with the tournament predictions. 

I've made a hacky Excel 8 years ago and it still does it's job well enough today.

# Download links for the impatient

You can download the spreadsheet from the following links or copy the link to your own Google Drive:

[XLSX (Google Drive )]
[ODS (Google Drive)]

Alternatively, you can use 4Shared to get it:

[ODS (4shared)]
[XLSX (4shared)]

I intend to explain the logic/functions in my blog later on if people are interested.

# What problems does this spreadsheet solve:

- Be offline at all times (Complete privacy).

- No scripting or macros.  Just plain old excel formulas that require no user privileges.

- Be able to enter the predictions of many participants.

- Be able to specify how many points a participant wins for guessing the outcome and how many for guessing the exact score.

- Have the rankings and standings be updated automatically and correctly.

- Handle the possibility of PKs.

- Give people the possibility to localize the spreadsheet if they're so inclined.

- Protect the spreadsheet cells that shouldn't be modified to breakage by user mistakes.

Enjoy and post your predictions!

--------

For those completely out of touch... No, USA did not qualify...  :o

2
As I get the occasional email asking for it and this was the original place I posted it last times, I'm just going to put it here in case anyone makes use of it:

https://drive.google.com/file/d/0B9mc3Ka9r6_yNldFSUx3WlJUTlU/edit?usp=sharing

(that's a preview - download from google drive from the menu or with Ctrl + S)

History:
Euro cup predictor 2012

So, a couple of people asked for a modification of the World Cup Prediction Maker tailored for the Euro so there you go.  Have fun.

Quote from: From the old thread
Ok.  How about a little game?  Who's good enough to predict the outcome of the world cup (groups, latter stages)?

Here's a little excel spreadsheet I wrote yesterday (in a few minutes) for my friends after a long discussion about possible outcomes.

The spreadsheet does what it has to do.  Groups are decided by pts, goal diff, goals to, goals against. 2nd Stage has even an option for a tie with penalties.

Fool around and make your guesses.  Lets see how they change as the World Cup comes nearer.

Euro Cup Prediction Maker 2010 1.1.xls
or with mediafire

1.1:  As always.  I botched up something.  Group Matches for B,C and D were reversed in the database.  Now fixed.

I promise I'll put my results before the WC.  :P

3
Euro cup predictor 2012

So, a couple of people asked for a modification of the World Cup Prediction Maker tailored for the Euro so there you go.  Have fun.

Quote from: From the old thread
Ok.  How about a little game?  Who's good enough to predict the outcome of the world cup (groups, latter stages)?

Here's a little excel spreadsheet I wrote yesterday (in a few minutes) for my friends after a long discussion about possible outcomes.

The spreadsheet does what it has to do.  Groups are decided by pts, goal diff, goals to, goals against. 2nd Stage has even an option for a tie with penalties.

Fool around and make your guesses.  Lets see how they change as the World Cup comes nearer.

Euro Cup Prediction Maker 2010 1.1.xls
or with mediafire

1.1:  As always.  I botched up something.  Group Matches for B,C and D were reversed in the database.  Now fixed.


4
Not entirely sure where it should go so I make a note here about the thread:
http://www.bay12forums.com/smf/index.php?topic=86811.0  <- Forum games and Roleplaying.


5
So, there's this small contest for tomorrow on a class that involves very simple AIs.  The point is that, to make interesting test for the contest, I'd like to have a wide range of different abilities so that we can surprise as many AIs as possible with the cause and effects.

Each creature has 6 attributes that are assigned randomly by a 3 6-sided dice rolls (3d6).  So they can be from 3 to 18.  This is unmodifiable.  No attack or defense will change those stats.
These are:
CON : Constitution
DEX :  Dexterity
STR:   Strength
INT:    Intelligence
WIS:   Wisdom
CHA:   Charisma.
^^ Those are permanent.

Each creature has 3 indicators that can be modified by an attack:

XP = Experience (starts as 0 and improves over each victory) (Experience points)
HP = Sum of all stats (CON + DEX + STR + INT + WIS + CHA)  (health points)
MP = WIS + INT  (magic points)

Indicators can be modified by attacks (on both the attacker and the attacked)

- The fights are turn based.
- The creature with biggest (CON + DEX) attacks first.  Then, the other.
- The first creature to reach 0 loses.
- 3 Abilities will be assigned at random  for each creature making sure they satisfy the requirements
- Each victory will give a creature +1 XP.
- The contest is not really efficient as it might be bracket based and have small amounts of battles between each AI so there's no need to worry about that.  Just to design interesting abilities.


The format of each ability should be something like this:

Name:  Fireball
Description:  Uses his energy to throw a fireball.
Author Alexhans
Requirements to summon :  INT: 7, WIS: 10, MP: 6  (Requirements can only get info from the summoning creature)
Effect on target creature
You can be creative here because these are overloaded functions that can see every stat of the attacked creature and also of the attacker.
For example:
remove 2 HP from the target + (Self.WIS + Self.INT) - (Enemy.WIS - Enemy.CON) if it's > 0, of course.
Effect on self:
Self.MP - 3 (waste of magic energy)

I just want a brainstorm of any cool ability you can come up with. From simple ones to bizarre and extreme ones.   The contest will be tomorrow but, If I can make myself some time, I'll post examples of battles over the weekend.

If there's any doubts, just ask.

Thanks. 

                                              Alexhans


Other notes:
The ability could be directly on the same creature.  Healing, for example.
No round info or number of rounds can be stored.  Not knowing how many times it did X action. 
if a creature loses a battle it dies (The AI's can make it run away though, to save it and it's xp but they'll lose the battle)

Anyway, guys, remember that rolls stats are 3 to 18, which means the avg stat will be 10/11.  If you put too many high stats most of those abilities won't be available for creatures.  It might be better to let stats affect the amount of damage or magic usage or whatever.  MP's values will range from 6 to 36.  HP's values will range from 18 to 108 (but you should realize it's like a gaussian curve.  The values tend to be closer to the range 60-66)




6

server:   irc.newnet.net
Channel:  #bay12prog

Suggested Pastebin: http://b12prog.pastebin.com/
Interesting Collaboration tool http://piratepad.net/bay12prog


Welcome!  This is an attempt to help promote what I thought was a good idea for beginning (and not so much) programmers who were looking for a friendly place to seek help, guidance and motivation.

There may be different levels of knowledge regarding programming but what we must never forget is that we are always learning.  To enhance the experience, We can't allow ego around here.  Ego makes us self-conscious about ourselves and limits both our ability to teach and our productivity.  You must be proud of your improvements, but you must let other people walk their natural journey through knowledge.

Most programming knowledge comes from your own investigation of how things work and then trying things out.  Theory is important but it's easier to remember something once you've tested it in the field.  Some say, it's the only way.

When asking a question, it is of extreme importance for the success of the inquiry to consider a number of things wich are explained in a very clear way here:
How to ask questions the smart way

No one here is going to be assigned as an instructor or anything like it.

The point of this innitiative is to be able to help other people progress and learn in the process, have fun and experiment with different concepts and varied ways of doing things.  When you have the opportunity to see different approaches to a specific problem, even if they might not be the most efficient, they might just open your mind a great deal.

For now,  I'll start with some varied challenges (Most might be "borrowed" exactly or slightly modified from other pages and some will be made specifically):

The idea is to serve as a learning and sharing vehicle.

Right now I'm focusing a lot in the c++ language because it's the one I'm more familiar with but the thread and channel should be about anyone you want/need.

As far as the challenges/exercises go... I think that judges are not really a necessity.  In many situations, you'll be able to tell if something worked or not.  But it may be helpful to hand the solutions to a particular person or group of appointed people so that you can get some opinions and insight and, as I said earlier, they will probably learn something else too.

If people want solutions to be shared in a more open way,  it would probably be a good idea, after a certain period of time, to have a spoiler tag with links to solutions in a pastebin (like http://b12prog.pastebin.com/).  So people, after providing their own solution, could proceed to compare and investigate different ideas.

Everything is open to debate.  We can just use the system that we prefer.

The idea of a challenge/contest would be to provide both the challenge and some resources (links, search guidance) needed to learn how to approach the problem.



The following is definetly under construction.  Help me out with the best ones online.  I don't want to just clutter it with all I've seen but try to post the most helpful ones.

Resources:
Language Specific
C++
http://www.learncpp.com/        (As I keep emphasizing in my signature.  A great tutorial site)
http://www.parashift.com/c++-faq-lite/

C
Beej's Guide to C  Allegedly good for pointers and arrays (humor included).

C#
  • MSDN - Blacken suggested this one, excellent documentation on all the standard C# stuff.
  • C# Tutorial - This might be a little bit above the average introductory programming tutorial, but for anyone with some level of programming experience, it's fairly simple.
  • Moving From C++ to C# - A PDF file that covers most of the differences between C++ and C#, fairly thorough.

Java
How to Think Like a Computer Scientist (Java Version)

Python
-How to Think Like a Computer Scientist:Python
-Dive into Python
-
How to Think Like a Computer Scientist (Python)


Ruby
-Try Ruby Seriously right in your browser, it goes over the basic syntax for Ruby as well as some basic commands from a webapp in your browser.
-pickaxe for ruby 1.6, still very relevant
-Learn to Program
Clever Algorithms PhD describes 45 algorithms from the field of Artificial Intelligence.

LOGO
-How to Think.
 
Lua
http://www.lua.org/pil/

Perl
Cpan (giant library of perl modules)
Challenge Sites:
Until I write most of the ones I've thought we can start trying out any of these:
sphere online judge
CProgramming HelpFree Challenges
CProgramming Basic code completion
Some programming challenges I liked in a blog
Programming_Challenges (I just found this one and it looks very interesting)

Lisp
Practical Common Lisp - Free Web Book Version.

Other online judges: http://en.wikipedia.org/wiki/Online_judge

Game Development Related:
Gamedev
Temple of the roguelike
(I've heard good things about this one but I don't particularly know it)

Api/Library Specific:
Win32:
http://www.winprog.org/tutorial/

Graphics:
SDL:
- Add your own.
 
Allegro
  • Allegro CC Manual - An excellent resource, not a tutorial by any stretch, but a great reference material for finding information on the API, among other things.
  • Cpp Game Programming - This website has a pretty good Allegro, introduction level tutorial.  It's where I picked it up.

OpenGl
OpenGl's RedBook (Using GLUT)
Nehe.Gamedev

SFML
Simple and Fast Multimedia Library
Misc
Getting Started With IRC

Web Development
w3schools




Contests will have a code for easy reference.  It's more than likely that the order will be changed.

Challenge 1) CODE: REAL_AGE

Write a program that will ask you for your date of birth and will output your resulting age (Years and months in one hand & total number of days in the other).
Example:
John:  Born: 13/2/1988  (Current date: 21/5/2010)
Result:  "John is 22 years, 3 months old.  He has lived in this world for 8133 days."

What you must Consider: You might do it the hard way... Or you might use a time library.

Challenge 2) CODE: ELLAPSED_TIME.
Write a Macro to measure the ellapsed time of a given function (useful when debugging) 
What you must know: Preprocessor directives.

Challenge 3) CODE: QUADRATIC
B)  Make a program that solves the quadratic roots of an equation of the form: ax^2 + bx + c
specify a,b,c by asking the user each of those numbers in turn. 
What you must consider: http://en.wikipedia.org/wiki/Quadratic_equation[Quadratic Equations.  Divide by zero?  Possible results? 1? 2?

I)  Now make it so that the user can input the equation in the form and you will parse the necessary information.
Take into account the user can write any number of whitespaces in between the plus signs or none at all:
Take into account that one of the numbers may be zero and be ommitted (2x^2 for example would mean a=2, b=0, c=0)
Do it for positive numbers at first.  What do you have to consider for negative ones?
ax^2   +     bx    +c
What you must consider:  Text parsing + everything you did for last exercise.

A)  Extend it to ax^3.  Figure out if you can make it so that the program can analyze and solve an equation input of the way:
3x^2 + 5x + 5x^2 + 1 +   

Challenge 4) CODE: SOURCEPRINT
Write a program such tht it prints its own source code as output.
What you must consider: File input/output

Challenge 5) (By qwertyuiopas): CODE: LASTCHAR
Read in a string as input(any method. Passing on the command line, stdin, file input/output, anything else).
Once the entire string has been input, print the last character, a new line, then the input string, with every third "e" replaced with "ii". Printing the last character prevents the easy solution of "input character, if it is the third e, write ii, else write that character back out.
Output is also your choice, as long as it can be read.(Technically, the "cheating" that can be accomplished with fseek or equivalent on file output would probably require about as much skill as any other solution in a language without strings that automatically resize to fit any added characters.)


I'd like to get some opinions:
  • What type of challenge would you be interested in?
  • Would you like to participate in contests to be forced to follow a time constraint? (should be in a time period where people are not too busy)
  • Any other ideas?

TODO in this thread:
  • Tidy up the contests and organize them depending on the topic.  Organize contests in the 2nd page.
  • Add more contests to cover more subjects.  Make sure the objective is clearly explained
  • Add resources about different languages.  C#, Java, Python, LUA
  • Associate a brief description to each link


Remember:
What this is place is for:
A friendly place to learn and practice various programming subjects without fear of being completely wrong. 
What this place is not for:
No religion wars.  No X is better statements with no backup.  If you want to suggest what you think is a better tool you are allowed to do so but try to show provable advantages and accept calmly any disagreements.  After all, it's just a suggestion.  You're not in the same team at work.
Why B12 and not some other programming forum?
Because, from what I see, there's a lot of people who are honestly interested in programming and hang around here, but sometimes, due to lack of support or guidance they give up or are scared too easyly by what looks like a daunting enterprise.  B12 is a place to have fun and programming can be LOADS of fun.  You don't need to be Newton.  As times goes by, you'll probably want to take upon harder challenges, but, if you do it at your own pace, they will still be entertaining. 

Finally.  I, as you, am human.  So feel free to point any mistake I might've made so I can correct it.

7
All names have been changed to protect the users:
Spoiler (click to show/hide)

What's your take on this?

Rules: No Flaming.  If I count 2 flaming posts I'll just lock the thread.  No warnings.
1) Is there a programming language that sucks?
2) Are there any languages that you think should be buried? why?
3) What's popularity to a language?



8
Other Games / Addictive Basketball Flash Game with B12 Rankings!!!
« on: January 14, 2010, 02:11:41 pm »

Simple mechanics.  Aim and Shoot!   You've got 2 minutes to try and score the biggest amount of points. 

Clean net gives you double points.

There's practice time between each game.

Don't forget to change your nick with the "edit player" button.

Link to be in the B12 ranking.

9
Play With Your Buddies / I'm bored... Isketch anyone? (pictionary online)
« on: December 25, 2009, 03:33:24 am »
http://www.isketch.net/i2.html

I'm bored and need to kill some time...

Does someone want to play?

We can make a b12 room and laugh a bit...

10
Life Advice / Forgivenote
« on: December 14, 2009, 02:20:45 am »
Inspired in the anime Deathnote... I discovered a psychological way to deal with  ugly situations.

I was pissed at a group of friends I have (not my closest but still had great times with them) for certain incident that doesn't really matter.

I couldn't sleep at night going over it again and again.  Angry about their "stupidity", "stubborness", etc... It was half anger, half sadness...

So I grabbed a notepad and remembered Deathnote... But eliminating people is not the answer as Light-kun should know... ;)

So I wondered... What if I could write down their motives?  What if I could understand them?  Then I could easyly forgive them and sleep in peace.  Doesn't matter what they do on the other end.  I will be fine. 

So I did.  I analyzed their personalities.  Looking at their strenghts and weaknesses.  And I understood.  And I forgave. 

I know there's some sort of technical explanation for this.  Writing your problems is a way to look at them from a more objective perspective and a way to lose steam.

You can't imagine the peace that I felt after I had done this.  I could look back at them with fondness again... Knowing why they act like they do.  What are they afraid of and how they cling to a state of security that allows them to feel good about their lives.

Good therapy.

You may not be able to change people (although they might change or realize stuff after some time) but you're able to understand them and accept life as it is.  Key to happyness.

Farewell.  :)

11
Ok.  How about a little game?  Who's good enough to predict the outcome of the world cup (groups, latter stages)?

Here's a little excel spreadsheet I wrote yesterday (in a few minutes) for my friends after a long discussion about possible outcomes.

The spreadsheet does what it has to do.  Groups are decided by pts, goal diff, goals to, goals against. 2nd Stage has even an option for a tie with penalties.

What it lacks right now.  Is a nice visual interface but that's not so important for now.

Fool around and make your guesses.  Lets see how they change as the World Cup comes nearer.

EDIT:  Oh... I forgot I had made it in spanish... 

EDIT2:  Done.  2 language support:

EDIT3:  Solved mistake in semifinals.  Thanks Ulric .


EDIT4: Beta Version available. 
World Cup Prediction Maker 2010 1.39.xls


Added Database for prediction contests with rankings.
Fixed GA, GF, Database
In case of total ties.  Initial order is mantained.

12
Mafia / B12 Mafia Awards 2009 (Taking nominations & suggestions for a name)
« on: November 06, 2009, 01:03:11 pm »
The <insert name of award here> are an annual award given for outstanding performance in Mafia games. They are nominated by other players, and voted on by a small panel of judges to be determined (there ARE alternatives for this).  We will do once each year but this, being the first award will include the few games occurring in 2008.

To nominate someone specify the nomination and provide a link to the the post, or game you're referring to.  You MUST present proof/give a reason for each nomination.

Nominations will go on for Nov/Dec an we will set dates for the reviews and decisions.

Here goes the possible nominations.  If you want to remove one or add your own, submit the request and the link.  Think if it belongs to another existing nomination or if it's just jest for the joke awards.

Player Awards

  • Best Performance by an Individual (Pro-Town).
  • Best Performance by an Individual (Scum).
  • Best Performance by a Team.
  • Best Performance by a Third Role.
  • Most Reputed Mafia Catcher.
  • Most Cunning Manipulation.
  • Best Performance in a Losing Cause.
  • Best breaking of a setup.
  • Most Outstanding New Player. (should have joined a game no later than ~Oct. 2008)
  • Most Influential Player.
  • Most Improved Player
  • Best Replacement
  • Best Role Claim
  • Funniest Role Claim

Moderator Awards

  • Craziest Setup
  • Most Enjoyable Game
  • Most Balanced Game
  • Best Flavor Text
  • Best Setup
  • Best Role (new or adaptation)
  • Craziest Role

Site Awards
  • Best Contribution to Mafia Discussion
  • Funniest Player
  • Honorary Mentions for 'x' reason. (The first guy to ever talk about mafia here, etc)

Joke Awards
  • Most likely to lynch a confirmed townie.
  • Most likely to be lynched.
  • Most likely to be scum.
  • Always suspicious.
  • Top wall of poster.
  • Eternal Null read.
  • WIFOM addict.
  • Funniest to kill.
  • Top bandwaggoner.

It might be cool to recopilate some records as well.  I'll give you more info on that during the weekend.

I advice you to go skim a bit through the mafia board before nominating...  Don't forget old games you played.

Also, we need a name for the awards!  Let's be original but clearly express our idiosyncrasy.

Remember this is not a popularity contest.  It's just a place to point the highlights of mafia games for future reference.  It's a place to have fun too with the joke awards.


13
A bunch of friends are coming over and we'll hang around for a while before going out.

Games with 4 players are warmly welcome.
I have 2 usb joysticks and the remaining 2 can play on the keyboard.

I'd like to see if we can play something other than  n64's
Mario kart, Destruction Derby, Mario Tennis, Bomberman, etc, etc...

Any good freeware games?  ny games of like those I mentioned you might know of (must be light, don't have time to download anything else)?

Thanks.

14
Other Games / Diplomacy Live Games planning tread
« on: September 18, 2009, 10:52:53 pm »
I want to play a live game of Diplomacy if anyone is interested...

The game will be played at:
http://webdiplomacy.net

with 10 minute phases

Who wants to join?

Once we all confirm here Ill set up the game (otherwise I have to set a time limit for it to start.)

List of people who would be willing to play (Pm to check if they're online and willing):
unspecified:
sluissa
x2yzh9
Gaulgath
Sartain
on weekends:
Alexhans

15
Life Advice / Paintball Stories.
« on: August 29, 2009, 07:22:28 pm »
I'm going to play paintball for the first time in my life...

I'm really excited despite being really worn out after paddle this morning and football (soccer for the yanks :P) yesterday.  Insert more physical activities unnecessary gloating here.

I plan on being Rambo or at least a good Rainbow Six member tomorrow... so...

Any advice?  Experiences?

I don't think my counter strike awesomeness will help me very much here, though.   :D

I was planning on searching in the internet but this way is more fun...

Pages: [1] 2